Closed
Description
These lines were recently changed in #3358
xarray/xarray/backends/locks.py
Lines 87 to 92 in 3f9069b
If the 'cloudpickle' package is not installed, then dask.multiprocessing
is not available. The try/except
that used to be wrapped around if actual_get is dask.multiprocessing.get
meant that _get_scheduler()
worked in that case, returning "threaded"
(I assume this was the expected behaviour). After #3358, _get_scheduler()
raised an AttributeError: module 'dask' has no attribute 'multiprocessing'
until I installed 'cloudpickle'.
Suggest either reverting the changes that removed the try/except
or making 'cloudpickle' a dependency.
To reproduce:
- check 'cloudpickle' is not installed, but 'dask' is
- execute the following commands
>>> import xarray
>>> xarray.backends.api._get_scheduler()
Expected result: "threaded"
Actual result:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-20da238796b7> in <module>
----> 1 xarray.backends.api._get_scheduler()
~/.local/lib/python3.6/site-packages/xarray/backends/locks.py in _get_scheduler(get, collection)
87 pass
88
---> 89 if actual_get is dask.multiprocessing.get:
90 return "multiprocessing"
91 else:
AttributeError: module 'dask' has no attribute 'multiprocessing'
Metadata
Metadata
Assignees
Labels
No labels