dask / dask-tutorial

Dask tutorial
https://tutorial.dask.org
BSD 3-Clause "New" or "Revised" License
1.83k stars 702 forks source link

Problem running 01_dask.delayed notebook on macOS 10.15 #163

Closed hluetck closed 4 years ago

hluetck commented 4 years ago

I created a conda environment for dask as described on https://github.com/dask/dask-tutorial. I am running on macOS 10.15.3. In notebook 01_dask.delayed, I get an error when trying to run code cell 6: z.compute()

Output: distributed.protocol.core - CRITICAL - Failed to deserialize Traceback (most recent call last): File "/Users/henry/opt/miniconda3/envs/dask-tutorial/lib/python3.7/site-packages/distributed/protocol/core.py", line 106, in loads header = msgpack.loads(header, use_list=False, **msgpack_opts) File "msgpack/_unpacker.pyx", line 195, in msgpack._cmsgpack.unpackb ValueError: tuple is not allowed for map key distributed.scheduler - ERROR - Workers don't have promised key: ['tcp://127.0.0.1:49576'], add-e8bb802c-7629436c7cb2 NoneType: None distributed.client - WARNING - Couldn't gather 1 keys, rescheduling {'add-e8bb802c-7629436c7cb2': ('tcp://127.0.0.1:49576',)} distributed.nanny - WARNING - Restarting worker distributed.nanny - WARNING - Restarting worker distributed.nanny - WARNING - Restarting worker

I have to interupt the kernel to stop the process. In the terminal from which Jupyter was started, I see the following error: tornado.application - ERROR - Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOLoop object at 0x10cb4f050>>, <Task finished coro=<Worker.gather_dep() done, defined at /Users/henry/opt/miniconda3/envs/dask-tutorial/lib/python3.7/site-packages/distributed/worker.py:1890> exception=ValueError('tuple is not allowed for map key')>) Traceback (most recent call last): File "/Users/henry/opt/miniconda3/envs/dask-tutorial/lib/python3.7/site-packages/tornado/ioloop.py", line 743, in _run_callback ret = callback() File "/Users/henry/opt/miniconda3/envs/dask-tutorial/lib/python3.7/site-packages/tornado/ioloop.py", line 767, in _discard_future_result future.result() File "/Users/henry/opt/miniconda3/envs/dask-tutorial/lib/python3.7/site-packages/distributed/worker.py", line 1908, in gather_dep self.rpc, deps, worker, who=self.address File "/Users/henry/opt/miniconda3/envs/dask-tutorial/lib/python3.7/site-packages/distributed/worker.py", line 3136, in get_data_from_worker max_connections=max_connections, File "/Users/henry/opt/miniconda3/envs/dask-tutorial/lib/python3.7/site-packages/distributed/core.py", line 532, in send_recv response = await comm.read(deserializers=deserializers) File "/Users/henry/opt/miniconda3/envs/dask-tutorial/lib/python3.7/site-packages/distributed/comm/tcp.py", line 208, in read frames, deserialize=self.deserialize, deserializers=deserializers File "/Users/henry/opt/miniconda3/envs/dask-tutorial/lib/python3.7/site-packages/distributed/comm/utils.py", line 65, in from_frames res = _from_frames() File "/Users/henry/opt/miniconda3/envs/dask-tutorial/lib/python3.7/site-packages/distributed/comm/utils.py", line 51, in _from_frames frames, deserialize=deserialize, deserializers=deserializers File "/Users/henry/opt/miniconda3/envs/dask-tutorial/lib/python3.7/site-packages/distributed/protocol/core.py", line 106, in loads header = msgpack.loads(header, use_list=False, **msgpack_opts) File "msgpack/_unpacker.pyx", line 195, in msgpack._cmsgpack.unpackb ValueError: tuple is not allowed for map key

Thanks for any insights.

quasiben commented 4 years ago

There was a recent issue with mspack. If you upgrade dask/distributed to latest, you should be fine.

hluetck commented 4 years ago

Yes, upgrading to version 2.11 fixed the problem. Thanks!