dask-image imread v0.5.0 not working with dask distributed Client & napari
See original GitHub issue@kpasko made a bug report https://github.com/napari/napari/issues/2304 but it turns out this is a problem caused by dask-image
. I’ve copied the contents of the report into this issue (sadly I’m unable to transfer issues between different organisations).
What happened:
TypeError: can not serialize ‘function’ object
In distributed/client.py line 2635 futures = self._graph_to_futures
What you expected to happen:
successful image viewing
Minimal Complete Verifiable Example:
(Edited)
from dask.distributed import Client
import napari
from dask_image.imread import imread
client = Client()
data = imread('./*.tif')
napari.view_image(data)
Anything else we need to know?: Works fine when not initializing client, i.e.
from dask.distributed import Client
import napari
from dask_image.imread import imread
data = imread('./*.tif')
napari.view_image(data)
works as expected
Environment:
-
Napari/Dask version: dask 2021.2.0 pyhd8ed1ab_0 conda-forge dask-core 2021.2.0 pyhd8ed1ab_0 conda-forge dask-image 0.5.0 pyh44b312d_0 conda-forge distributed 2021.2.0 py39h6e9494a_0 conda-forge napari 0.4.5 pyhd8ed1ab_0 conda-forge napari-console 0.0.3 pyhd8ed1ab_0 conda-forge napari-plugin-engine 0.1.9 py39h6e9494a_1 conda-forge napari-svg 0.1.4 py_0 conda-forge
-
Python version: python 3.9.2 h2502468_0_cpython conda-forge
-
Operating System: OS X 11.2.1
-
Install method (conda, pip, source): conda
Issue Analytics
- State:
- Created 3 years ago
- Comments:61 (31 by maintainers)
Top GitHub Comments
@jakirkham @jrbourbeau I can confirm that https://github.com/dask/dask/pull/7353 fixes all problems discussed in this issue and in particular the original
dask-image
-napari
workflow 🎉Okay I narrowed it down to (without
napari
):Same error: