I've started trying to transition the Change_filmstrips.ipynb notebook from DEA to DE Africa, but am running into some errors with Dask. I think it might be an environment issue, since the same code (aside from a few variable changes to work with Africa) is working fine in the DEA Sandbox. I've pasted the error below, and while looking into it, I noticed that this thread also had the same error message as I am currently getting: dask/distributed#3491
Starting analysis...
Using pixel quality parameters for USGS Collection 1
Finding datasets
ls5_usgs_sr_scene
ls7_usgs_sr_scene
Ignoring SLC-off observations for ls7
ls8_usgs_sr_scene
Applying pixel quality/cloud mask
Returning 235 time steps as a dask array
Generating geomedian composites and plotting filmstrips... (click the Dashboard link above for status)
distributed.protocol.core - CRITICAL - Failed to deserialize
Traceback (most recent call last):
File "/env/lib/python3.6/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.core - ERROR - tuple is not allowed for map key
Traceback (most recent call last):
File "/env/lib/python3.6/site-packages/distributed/core.py", line 448, in handle_stream
msgs = await comm.read()
File "/env/lib/python3.6/site-packages/distributed/comm/tcp.py", line 208, in read
frames, deserialize=self.deserialize, deserializers=deserializers
File "/env/lib/python3.6/site-packages/distributed/comm/utils.py", line 65, in from_frames
res = _from_frames()
File "/env/lib/python3.6/site-packages/distributed/comm/utils.py", line 51, in _from_frames
frames, deserialize=deserialize, deserializers=deserializers
File "/env/lib/python3.6/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.core - ERROR - tuple is not allowed for map key
Traceback (most recent call last):
File "/env/lib/python3.6/site-packages/distributed/core.py", line 404, in handle_comm
result = await result
File "/env/lib/python3.6/site-packages/distributed/scheduler.py", line 2253, in add_client
await self.handle_stream(comm=comm, extra={"client": client})
File "/env/lib/python3.6/site-packages/distributed/core.py", line 448, in handle_stream
msgs = await comm.read()
File "/env/lib/python3.6/site-packages/distributed/comm/tcp.py", line 208, in read
frames, deserialize=self.deserialize, deserializers=deserializers
File "/env/lib/python3.6/site-packages/distributed/comm/utils.py", line 65, in from_frames
res = _from_frames()
File "/env/lib/python3.6/site-packages/distributed/comm/utils.py", line 51, in _from_frames
frames, deserialize=deserialize, deserializers=deserializers
File "/env/lib/python3.6/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
---------------------------------------------------------------------------
CancelledError Traceback (most recent call last)
<ipython-input-3-89e63d5a63de> in <module>
5 resolution,
6 max_cloud,
----> 7 ls7_slc_off)
~/dev/deafrica-sandbox-notebooks/Scripts/notebookapp_changefilmstrips.py in run_filmstrip_app(output_name, time_range, time_step, tide_range, resolution, max_cloud, ls7_slc_off, size_limit)
239 print('\nGenerating geomedian composites and plotting '
240 'filmstrips... (click the Dashboard link above for status)')
--> 241 ds_geomedian = ds_geomedian.compute()
242
243 # Reset CRS that is lost during geomedian compositing
/env/lib/python3.6/site-packages/xarray/core/dataset.py in compute(self, **kwargs)
805 """
806 new = self.copy(deep=False)
--> 807 return new.load(**kwargs)
808
809 def _persist_inplace(self, **kwargs) -> "Dataset":
/env/lib/python3.6/site-packages/xarray/core/dataset.py in load(self, **kwargs)
649
650 # evaluate all the dask arrays simultaneously
--> 651 evaluated_data = da.compute(*lazy_data.values(), **kwargs)
652
653 for k, data in zip(lazy_data, evaluated_data):
/env/lib/python3.6/site-packages/dask/base.py in compute(*args, **kwargs)
434 keys = [x.__dask_keys__() for x in collections]
435 postcomputes = [x.__dask_postcompute__() for x in collections]
--> 436 results = schedule(dsk, keys, **kwargs)
437 return repack([f(r, *a) for r, (f, a) in zip(results, postcomputes)])
438
/env/lib/python3.6/site-packages/distributed/client.py in get(self, dsk, keys, restrictions, loose_restrictions, resources, sync, asynchronous, direct, retries, priority, fifo_timeout, actors, **kwargs)
2570 should_rejoin = False
2571 try:
-> 2572 results = self.gather(packed, asynchronous=asynchronous, direct=direct)
2573 finally:
2574 for f in futures.values():
/env/lib/python3.6/site-packages/distributed/client.py in gather(self, futures, errors, direct, asynchronous)
1870 direct=direct,
1871 local_worker=local_worker,
-> 1872 asynchronous=asynchronous,
1873 )
1874
/env/lib/python3.6/site-packages/distributed/client.py in sync(self, func, asynchronous, callback_timeout, *args, **kwargs)
765 else:
766 return sync(
--> 767 self.loop, func, *args, callback_timeout=callback_timeout, **kwargs
768 )
769
/env/lib/python3.6/site-packages/distributed/utils.py in sync(loop, func, callback_timeout, *args, **kwargs)
332 if error[0]:
333 typ, exc, tb = error[0]
--> 334 raise exc.with_traceback(tb)
335 else:
336 return result[0]
/env/lib/python3.6/site-packages/distributed/utils.py in f()
316 if callback_timeout is not None:
317 future = gen.with_timeout(timedelta(seconds=callback_timeout), future)
--> 318 result[0] = yield future
319 except Exception as exc:
320 error[0] = sys.exc_info()
/env/lib/python3.6/site-packages/tornado/gen.py in run(self)
733
734 try:
--> 735 value = future.result()
736 except Exception:
737 exc_info = sys.exc_info()
CancelledError: