Replies: 1 comment
-
After a couple of hours of trying I finally realized that the problem was the outdated package ( msgpack). It was changed from "msgpack-python" to "msgpack" since it's version 0.5. If anyone encounters such an error, unistall msgpack-python and install the latest and corrected version. form more info visit https://stackoverflow.com/questions/64350645/attributeerror-module-object-has-no-attribute-dumps and for the correct installation go to https://pypi.org/project/msgpack/. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I recently upgraded Anaconda from version 4.x to 23.x after installing xarray, rioxarray, geopandas , cartopy and other packages, I tried to clip the xarray dataset using the Shapefile of my study area but the clipped results cannot be saved or plotted, giving error which is hardly to understand.
Here bellow is a snippet of my script and error
Read Shapefile data
shapefile=gpd.read_file(path+"study_area.shp",crs="epsg:4326")
Open data
interestedfiles=glob.glob(path+"/Climatedata/Annual*.nc")
data=xr.open_mfdataset(interestedfiles)
clipped_ds = data.rio.clip(shapefile.geometry)
clipped_ds.to_netcdf('clipped_annual_data.nc')
Errors look like this
2023-08-03 01:32:27,816 - distributed.protocol.core - CRITICAL - Failed to deserialize
Traceback (most recent call last):
File "/home/celestin/anaconda3/lib/python3.11/site-packages/distributed/protocol/core.py", line 158, in loads
return msgpack.loads(
^^^^^^^^^^^^^^
File "/home/celestin/anaconda3/lib/python3.11/site-packages/msgpack/fallback.py", line 136, in unpackb
raise ExtraData(ret, unpacker.get_extradata())
msgpack.exceptions.ExtraData: unpack(b) received extra data.
2023-08-03 01:32:27,819 - distributed.core - ERROR - Exception while handling op register-client
Traceback (most recent call last):
File "/home/celestin/anaconda3/lib/python3.11/site-packages/distributed/core.py", line 924, in handle_comm
result = await result
^^^^^^^^^^^^
File "/home/celestin/anaconda3/lib/python3.11/site-packages/distributed/scheduler.py", line 5449, in add_client
await self.handle_stream(comm=comm, extra={"client": client})
File "/home/celestin/anaconda3/lib/python3.11/site-packages/distributed/core.py", line 977, in handle_stream
msgs = await comm.read()
^^^^^^^^^^^^^^^^^
File "/home/celestin/anaconda3/lib/python3.11/site-packages/distributed/comm/tcp.py", line 254, in read
msg = await from_frames(
^^^^^^^^^^^^^^^^^^
File "/home/celestin/anaconda3/lib/python3.11/site-packages/distributed/comm/utils.py", line 100, in from_frames
res = from_frames()
^^^^^^^^^^^^^^
File "/home/celestin/anaconda3/lib/python3.11/site-packages/distributed/comm/utils.py", line 83, in from_frames
return protocol.loads(
^^^^^^^^^^^^^^^
File "/home/celestin/anaconda3/lib/python3.11/site-packages/distributed/protocol/core.py", line 158, in loads
return msgpack.loads(
^^^^^^^^^^^^^^
File "/home/celestin/anaconda3/lib/python3.11/site-packages/msgpack/fallback.py", line 136, in unpackb
raise ExtraData(ret, unpacker.get_extradata())
msgpack.exceptions.ExtraData: unpack(b) received extra data.
Task exception was never retrieved
future: <Task finished name='Task-686417' coro=<Server.handle_comm() done, defined at /home/celestin/anaconda3/lib/python3.11/site-packages/distributed/core.py:830> exception=ExtraData(({'op': 'update-graph', 'graph_header': {'serializer': 'pickle', 'writeable': (True, True, True, True, True, True, True, True)}, 'graph_frames': (b'\x80\x05\x95=(\x00\x00\x00\x00\x00\x00\x8c\x1edistributed.protocol.serialize\x94\x8c\x08ToPickle\x94\x93\x94)\x81\x94}\x94\x8c\x04data\x94\x8c\x13dask.highlevelgraph\x94\x8c\x0eHighLevelGraph\x94\x93\x94)\x81\x94}\x94(\x8c\x0cdependencies\x94}\x94\x8a\x06\xc0\x11!\xf2\x9f\x7f\x8f\x94s\x8c\x10key_dependencies\x94}\x94\x8c\x06layers\x94}\x94\x8a\x06\xc0\x11!\xf2\x9f\x7fh\x06\x8c\x11MaterializedLayer\x94\x93\x94)\x81\x94}\x94(\x8c\x0bannotations\x94N\x8c\x16collection_annotations\x94N\x8c\x07mapping\x94}\x94((\x8c*store-map-8110f8a87566644466652c0be4bbe893\x94K\x00K\x00K\x00t\x94(\x8c\x0fdask.array.core\x94\x8c\x0bstore_chunk\x94\x93\x94(\x8c(getitem-31d574f769a5a789d8725daebd1eaad8\x94K\x00K\x00K\x00t\x94\x8c\x18xarray.backends.netCDF4\x94\x8c\x13NetCDF4ArrayWrapper\x94\x93\x94)\x81\x94N}\x94(\x8c\tdatastore\x94h!\x8c\x10NetCDF4DataStore\x94\x93\x94)\x81\x94N}\x94(\x8c\tautoclose\x94\x88\x8c\x06format\x94\x8c\x07NETCDF4\x94\x8c\tis_remote\x94\x89\x8c\x04lock\x94\x8c\x15xarray.backends.locks\x94\x8c\x0cCombinedLock\x94\x93\x94)\x81\x94}\x94\x8c\x05locks\x94\x8c\ndask.utils\x94\x8c\x10SerializableLock\x94\x93\x94)\x81\x94\x8c$15944f3a-1674-4cc3-aea2-5211a9810539\x94bh8)\x81\x94\x8c$29a38ec2-5abf-41cb-875f-1101f09505e8\x94b\x8c\x10distributed.lock\x94\x8c\x04Lock\x94\x93\x94\x8cK/home/celestin/postdoc/Projects/Sensitivity_analysis/clipped_annual_data.nc\x94\x85\x94R\x94\x87\x94sb\x8c\t_filename\x94\x8cK/home/celestin/postdoc/Projects/Sensitivity_analysis/clipped_annual_data.nc\x94\x8c\x06_group\x94N\x8c\x08_manager\x94\x8c\x1cxarray.backends.file_manager\x94\x8c\x12CachingFileManager\x94\x93\x94)\x81\x94(\x8c\x10netCDF4.netCDF4\x94\x8c\x07Dataset\x94\x93\x94h@\x85\x94\x8c\x01a\x94}\x94(\x8c\x07clobber\x94\x88\x8c\x08diskless\x94\x89\x8c\x07persist\x94\x89h,h-uN\x8c$43ed1d36-bd4a-47f9-a630-6e6d23e2521d\x94t\x94b\x8c\x05_mode\x94\x8c\x01w\x94u\x86\x94b\x8c\x05dtype\x94\x8c\x05numpy\x94hZ\x93\x94\x8c\x02f4\x94\x89\x88\x87\x94R\x94(K\x03\x8c\x01<\x94NNNJ\xff\xff\xff\xffJ\xff\xff\xff\xffK\x00t\x94b\x8c\x05shape\x94K2KKK\x8e\x87\x94\x8c\rvariable_name\x94\x8c\x02RH\x94u\x86\x94b\x8c\x08builtins\x94\x8c\x05slice\x94\x93\x94K\x00K2N\x87\x94R\x94hiK\x00KKN\x87\x94R\x94hiK\x00K\x8eN\x87\x94R\x94\x87\x94N\x89t\x94(\x8cstore-map-f9332c8ad40b6d25083dd4274d7ee267\x94K\x00K\x00K\x00t\x94(h\x1e(\x8c(getitem-b1651f05a459abcdcc968bca64f05ee6\x94K\x00K\x00K\x00t\x94h#)\x81\x94N}\x94(h&h)hZh_hbK2KKK\x8e\x87\x94hd\x8c\x05Tmean\x94u\x86\x94bhiK\x00K2N\x87\x94R\x94hiK\x00KKN\x87\x94R\x94hiK\x00K\x8eN\x87\x94R\x94\x87\x94N\x89t\x94(\x8cstore-map-b445f0e342eb3f8f354c17df8790def4\x94K\x00K\x00K\x00t\x94(h\x1e(\x8c(getitem-4b2bfcaf7ff1da772fe7a6083c90e07e\x94K\x00K\x00K\x00t\x94h#)\x81\x94N}\x94(h&h)hZh_hbK2KKK\x8e\x87\x94hd\x8c\x02U2\x94u\x86\x94bhiK\x00K2N\x87\x94R\x94hiK\x00KKN\x87\x94R\x94hiK\x00K\x8eN\x87\x94R\x94\x87\x94N\x89t\x94(\x8cstore-map-a382403fc5ee803faaf017ba1fc2372c\x94K\x00K\x00K\x00t\x94(h\x1e(\x8c(getitem-b3b76315a95239dc3b8c3a2159672d2b\x94K\x00K\x00K\x00t\x94h#)\x81\x94N}\x94(h&h)hZh_hbK2KKK\x8e\x87\x94hd\x8c\x02Rn\x94u\x86\x94bhiK\x00K2N\x87\x94R\x94hiK\x00KKN\x87\x94R\x94hiK\x00K\x8eN\x87\x94R\x94\x87\x94N\x89t\x94(\x8cstore-map-2115d073e2cdba223ee5cd937cd165ca\x94K\x00K\x00K\x00t\x94(h\x1e(\x8c(getitem-d687a1a3361253ac5dce225e651b8907\x94K\x00K\x00K\x00t\x94h#)\x81\x94N}\x94(h&h)hZh_hbK2KKK\x8e\x87\x94hd\x8c\x03ETo\x94u\x86\x94bhiK\x00K2N\x87\x94R\x94hiK\x00KKN\x87\x94R\x94hiK\x00K\x8eN\x87\x94R\x94\x87\x94N\x89t\x94(\x8cstore-map-104486d3d4cc7d6a1f9f2c6ca63716e7\x94K\x00K\x00K\x00t\x94(h\x1e(\x8c(getitem-d17a9be4223968a0810b301142c4bb6d\x94K\x00K\x00K\x00t\x94h#)\x81\x94N}\x94(h&h)hZh_hbK2KKK\x8e\x87\x94hd\x8c\x04Tmin\x94u\x86\x94bhiK\x00K2N\x87\x94R\x94hiK\x00KKN\x87\x94R\x94hiK\x00K\x8eN\x87\x94R\x94\x87\x94N\x89t\x94(\x8cstore-map-5a30739e6953f4f72579fdc9f3ecb385\x94K\x00K\x00K\x00t\x94(h\x1e(\x8c(getitem-be944c0de41901c5892d4f7b8eaeac3e\x94K\x00K\x00K\x00t\x94h#)\x81\x94N}\x94(h&h)hZh_hbK2KKK\x8e\x87\x94hd\x8c\x04Tmax\x94u\x86\x94bhiK\x00K2N\x87\x94R\x94hiK\x00KKN\x87\x94R\x94hiK\x00K\x8eN\x87\x94R\x94\x87\x94N\x89t\x94(h\x85K\x00K\x00K\x00t\x94(\x8c6where-getitem-getitem-4b2bfcaf7ff1da772fe7a6083c90e07e\x94K\x00K\x00K\x00t\x94(h\x96K\x00K\x00K\x00t\x94(\x8c6where-getitem-getitem-b3b76315a95239dc3b8c3a2159672d2b\x94K\x00K\x00K\x00t\x94(h\xb8K\x00K\x00K\x00t\x94(\x8c6where-getitem-getitem-d17a9be4223968a0810b301142c4bb6d\x94K\x00K\x00K\x00t\x94(h\xc9K\x00K\x00K\x00t\x94(\x8c6where-getitem-getitem-be944c0de41901c5892d4f7b8eaeac3e\x94K\x00K\x00K\x00t\x94(htK\x00K\x00K\x00t\x94(\x8c6where-getitem-getitem-b1651f05a459abcdcc968bca64f05ee6\x94K\x00K\x00K\x00t\x94(h\xa7K\x00K\x00K\x00t\x94(\x8c6where-getitem-getitem-d687a1a3361253ac5dce225e651b8907\x94K\x00K\x00K\x00t\x94(h\x1fK\x00K\x00K\x00t\x94(\x8c6where-getitem-getitem-31d574f769a5a789d8725daebd1eaad8\x94K\x00K\x00K\x00t\x94\x8c9original-open_dataset-RN-fb6a16faac1562ba2f2345305f782bde\x94\x8c\x14xarray.core.indexing\x94\x8c!ImplicitToExplicitIndexingAdapter\x94\x93\x94)\x81\x94N}\x94(\x8c\x05array\x94h\xee\x8c\x10CopyOnWriteArray\x94\x93\x94)\x81\x94N}\x94(h\xf3h\xee\x8c\x12LazilyIndexedArray\x94\x93\x94)\x81\x94N}\x94(h\xf3h#)\x81\x94N}\x94(h&h()\x81\x94N}\x94(h+\x89h,h-h.\x89h/h2)\x81\x94}\x94h5h9h;\x86\x94sbhD\x8c>/home/celestin/postdoc/Thesis/NWC_annual_total_Rn_1971_2020.nc\x94hFNhGhJ)\x81\x94(hN\x8c>/home/celestin/postdoc/Thesis/NWC_annual_total_Rn_1971_2020.nc\x94\x85\x94\x8c\x01r\x94}\x94(hR\x88hS\x89hT\x89h,h-uN\x8c$4dd40534-2dbb-4f0b-8485-93e303c0a5db\x94t\x94bhWj\x07\x01\x00\x00u\x86\x94bhZh_hbK2K\xf0M\xe0\x01\x87\x94hd\x8c\x02RN\x94u\x86\x94b\x8c\x03key\x94h\xee\x8c\x0cBasicIndexer\x94\x93\x94)\x81\x94N}\x94\x8c\x04_key\x94hiNNN\x87\x94R\x94hiNNN\x87\x94R\x94hiNNN\x87\x94R\x94\x87\x94s\x86\x94bu\x86\x94b\x8c\x07_copied\x94\x89u\x86\x94b\x8c\x0bindexer_cls\x94h\xee\x8c\x0cOuterIndexer\x94\x93\x94u\x86\x94b\x8c&array-1422ca8216e3c787c775e1234d9786be\x94K\x00K\x00\x87\x94\x8c\x12numpy.core.numeric\x94\x8c\x0b_frombuffer\x94\x93\x94(\x97h\\x8c\x02b1\x94\x89\x88\x87\x94R\x94(K\x03\x8c\x01|\x94NNNJ\xff\xff\xff\xffJ\xff\xff\xff\xffK\x00t\x94bK\xf0M\xe0\x01\x86\x94\x8c\x01C\x94t\x94R\x94\x8c>original-open_dataset-sfcwind-24b21ca6be48e3cc7a30dbf94e46ffc0\x94h\xf0)\x81\x94N}\x94(h\xf3h\xf5)\x81\x94N}\x94(h\xf3h\xf9)\x81\x94N}\x94(h\xf3h#)\x81\x94N}\x94(h&h()\x81\x94N}\x94(h+\x89h,h-h.\x89h/j\x00\x01\x00\x00hD\x8cB/home/celestin/postdoc/Thesis/NWC_annual_mean_sfcwind_1971_2020.nc\x94hFNhGhJ)\x81\x94(hN\x8cB/home/celestin/postdoc/Thesis/NWC_annual_mean_sfcwind_1971_2020.nc\x94\x85\x94j\x07\x01\x00\x00}\x94(hR\x88hS\x89hT\x89h,h-uN\x8c$5955ffdb-870b-4a0e-9c6d-43a489ca187c\x94t\x94bhWj\x07\x01\x00\x00u\x86\x94bhZh_hbK2K\xf0M\xe0\x01\x87\x94hd\x8c\x07sfcwind\x94u\x86\x94bj\x0f\x01\x00\x00j\x11\x01\x00\x00)\x81\x94N}\x94j\x14\x01\x00\x00hiNNN\x87\x94R\x94hiNNN\x87\x94R\x94hiNNN\x87\x94R\x94\x87\x94s\x86\x94bu\x86\x94bj\x1e\x01\x00\x00\x89u\x86\x94bj \x01\x00\x00j"\x01\x00\x00u\x86\x94b\x8c=original-open_dataset-tasmin-91e9b4a42d5554629d6c6550a7d5846f\x94h\xf0)\x81\x94N}\x94(h\xf3h\xf5)\x81\x94N}\x94(h\xf3h\xf9)\x81\x94N}\x94(h\xf3h#)\x81\x94N}\x94(h&h()\x81\x94N}\x94(h+\x89h,h-h.\x89h/j\x00\x01\x00\x00hD\x8cA/home/celestin/postdoc/Thesis/NWC_annual_mean_tasmin_1971_2020.nc\x94hFNhGhJ)\x81\x94(hN\x8cA/home/celestin/postdoc/Thesis/NWC_annual_mean_tasmin_1971_2020.nc\x94\x85\x94j\x07\x01\x00\x00}\x94(hR\x88hS\x89hT\x89h,h-uN\x8c$e191b0ad-b54b-41fb-ab55-3f70247133e3\x94t\x94bhWj\x07\x01\x00\x00u\x86\x94bhZh_hbK2K\xf0M\xe0\x01\x87\x94hd\x8c\x06tasmin\x94u\x86\x94bj\x0f\x01\x00\x00j\x11\x01\x00\x00)\x81\x94N}\x94j\x14\x01\x00\x00hiNNN\x87\x94R\x94hiNNN\x87\x94R\x94hiNNN\x87\x94R\x94\x87\x94s\x86\x94bu\x86\x94bj\x1e\x01\x00\x00\x89u\x86\x94bj \x01\x00\x00j"\x01\x00\x00u\x86\x94b\x8c;original-open_dataset-hurs-6c20cf728bd2704dd59270c2933d7b4a\x94h\xf0)\x81\x94N}\x94(h\xf3h\xf5)\x81\x94N}\x94(h\xf3h\xf9)\x81\x94N}\x94(h\xf3h#)\x81\x94N}\x94(h&h()\x81\x94N}\x94(h+\x89h,h-h.\x89h/j\x00\x01\x00\x00hD\x8c@/home/celestin/postdoc/Thesis/NWC_annual_total_hurs_1971_2020.nc\x94hFNhGhJ)\x81\x94(hN\x8c@/home/celestin/postdoc/Thesis/NWC_annual_total_hurs_1971_2020.nc\x94\x85\x94j\x07\x01\x00\x00}\x94(hR\x88hS\x89hT\x89h,h-uN\x8c$d2e377af-d283-42a4-94c7-76dd7e1fa13e\x94t\x94bhWj\x07\x01\x00\x00u\x86\x94bhZh_hbK2K\xf0M\xe0\x01\x87\x94hd\x8c\x04hurs\x94u\x86\x94bj\x0f\x01\x00\x00j\x11\x01\x00\x00)\x81\x94N}\x94j\x14\x01\x00\x00hiNNN\x87\x94R\x94hiNNN\x87\x94R\x94hiNNN\x87\x94R\x94\x87\x94s\x86\x94bu\x86\x94bj\x1e\x01\x00\x00\x89u\x86\x94bj \x01\x00\x00j"\x01\x00\x00u\x86\x94b\x8c:original-open_dataset-tas-87984652606687bcab97681b6f136e8c\x94h\xf0)\x81\x94N}\x94(h\xf3h\xf5)\x81\x94N}\x94(h\xf3h\xf9)\x81\x94N}\x94(h\xf3h#)\x81\x94N}\x94(h&h()\x81\x94N}\x94(h+\x89h,h-h.\x89h/j\x00\x01\x00\x00hD\x8c>/home/celestin/postdoc/Thesis/NWC_annual_mean_tas_1971_2020.nc\x94hFNhGhJ)\x81\x94(hN\x8c>/home/celestin/postdoc/Thesis/NWC_annual_mean_tas_1971_2020.nc\x94\x85\x94j\x07\x01\x00\x00}\x94(hR\x88hS\x89hT\x89h,h-uN\x8c$2bced3d7-a558-4146-9ab0-570e1de71f5a\x94t\x94bhWj\x07\x01\x00\x00u\x86\x94bhZh_hbK2K\xf0M\xe0\x01\x87\x94hd\x8c\x03tas\x94u\x86\x94bj\x0f\x01\x00\x00j\x11\x01\x00\x00)\x81\x94N}\x94j\x14\x01\x00\x00hiNNN\x87\x94R\x94hiNNN\x87\x94R\x94hiNNN\x87\x94R\x94\x87\x94s\x86\x94bu\x86\x94bj\x1e\x01\x00\x00\x89u\x86\x94bj \x01\x00\x00j"\x01\x00\x00u\x86\x94b\x8c=original-open_dataset-tasmax-b08b25f2102d84cc6b0fbc1f25665e8f\x94h\xf0)\x81\x94N}\x94(h\xf3h\xf5)\x81\x94N}\x94(h\xf3h\xf9)\x81\x94N}\x94(h\xf3h#)\x81\x94N}\x94(h&h()\x81\x94N}\x94(h+\x89h,h-h.\x89h/j\x00\x01\x00\x00hD\x8cA/home/celestin/postdoc/Thesis/NWC_annual_mean_tasmax_1971_2020.nc\x94hFNhGhJ)\x81\x94(hN\x8cA/home/celestin/postdoc/Thesis/NWC_annual_mean_tasmax_1971_2020.nc\x94\x85\x94j\x07\x01\x00\x00}\x94(hR\x88hS\x89hT\x89h,h-uN\x8c$34731f21-aeaa-4ef1-ae3e-2db7b362883c\x94t\x94bhWj\x07\x01\x00\x00u\x86\x94bhZh_hbK2K\xf0M\xe0\x01\x87\x94hd\x8c\x06tasmax\x94u\x86\x94bj\x0f\x01\x00\x00j\x11\x01\x00\x00)\x81\x94N}\x94j\x14\x01\x00\x00hiNNN\x87\x94R\x94hiNNN\x87\x94R\x94hiNNN\x87\x94R\x94\x87\x94s\x86\x94bu\x86\x94bj\x1e\x01\x00\x00\x89u\x86\x94bj \x01\x00\x00j"\x01\x00\x00u\x86\x94b\x8c<original-open_dataset-ETRef-0392ed87a934b9199be8cb2b7aaac543\x94h\xf0)\x81\x94N}\x94(h\xf3h\xf5)\x81\x94N}\x94(h\xf3h\xf9)\x81\x94N}\x94(h\xf3h#)\x81\x94N}\x94(h&h()\x81\x94N}\x94(h+\x89h,h-h.\x89h/j\x00\x01\x00\x00hD\x8c?/home/celestin/postdoc/Thesis/NWC_annual_total_ETO_1971_2020.nc\x94hFNhGhJ)\x81\x94(hN\x8c?/home/celestin/postdoc/Thesis/NWC_annual_total_ETO_1971_2020.nc\x94\x85\x94j\x07\x01\x00\x00}\x94(hR\x88hS\x89hT\x89h,h-uN\x8c$7a96ef99-d05a-450f-a89d-2c843eb93a1f\x94t\x94bhWj\x07\x01\x00\x00u\x86\x94bhZh_hbK2K\xf0M\xe0\x01\x87\x94hd\x8c\x05ETRef\x94u\x86\x94bj\x0f\x01\x00\x00j\x11\x01\x00\x00)\x81\x94N}\x94j\x14\x01\x00\x00hiNNN\x87\x94R\x94hiNNN\x87\x94R\x94hiNNN\x87\x94R\x94\x87\x94s\x86\x94bu\x86\x94bj\x1e\x01\x00\x00\x89u\x86\x94bj \x01\x00\x00j"\x01\x00\x00u\x86\x94bh\xe9\x8c\x10dask.array.chunk\x94\x8c\x07getitem\x94\x93\x94(\x8c\x11dask.optimization\x94\x8c\x10SubgraphCallable\x94\x93\x94(}\x94(\x8c&where-e22287ed836617d30a12aee993e0dfff\x94\x8c9open_dataset-ETRef-where-e22287ed836617d30a12aee993e0dfff\x94j\x0c\x02\x00\x00(h[\x8c\x05where\x94\x93\x94\x8c\x13__dask_blockwise__0\x94h\x1c\x8c\x06getter\x94\x93\x94\x8c\x13__dask_blockwise__2\x94\x8c\x13__dask_blockwise__3\x94\x87\x94\x8c\x13__dask_blockwise__1\x94t\x94uj\x0b\x02\x00\x00(\x8c\x13__dask_blockwise__0\x94\x8c\x13__dask_blockwise__1\x94\x8c\x13__dask_blockwise__2\x94\x8c\x13__dask_blockwise__3\x94t\x94\x8c6subgraph_callable-99f8fdcf-68b1-4b42-b3f9-bce6e92c793f\x94t\x94R\x94\x8c&array-1422ca8216e3c787c775e1234d9786be\x94K\x00K\x00\x87\x94j(\x01\x00\x00(\x97h)j/\x01\x00\x00t\x94R\x94j\xe1\x01\x00\x00hiK\x00K2N\x87\x94R\x94hiK\x00K\xf0N\x87\x94R\x94hiK\x00M\xe0\x01N\x87\x94R\x94\x87\x94t\x94hiNNN\x87\x94R\x94hiKWK\xa2K\x01\x87\x94R\x94hiM\x0c\x01M\x9a\x01K\x01\x87\x94R\x94\x87\x94\x87\x94h\xdaj\x06\x02\x00\x00(j\t\x02\x00\x00(}\x94(\x8c&where-4b775071a5a6ccd3694094ed9af1eb85\x94\x8c;open_dataset-sfcwind-where-4b775071a5a6ccd3694094ed9af1eb85\x94j5\x02\x00\x00(j\x0e\x02\x00\x00\x8c\x13__dask_blockwise__0\x94j\x11\x02\x00\x00\x8c\x13__dask_blockwise__2\x94\x8c\x13__dask_blockwise__3\x94\x87\x94\x8c\x13__dask_blockwise__1\x94t\x94uj4\x02\x00\x00(\x8c\x13__dask_blockwise__0\x94\x8c\x13__dask_blockwise__1\x94\x8c\x13__dask_blockwise__2\x94\x8c\x13__dask_blockwise__3\x94t\x94\x8c6subgraph_callable-26c1f121-fdec-420d-b3cf-c83038dc0978\x94t\x94R\x94j%\x01\x00\x00j(\x01\x00\x00(\x97h)j/\x01\x00\x00t\x94R\x94j2\x01\x00\x00hiK\x00K2N\x87\x94R\x94hiK\x00K\xf0N\x87\x94R\x94hiK\x00M\xe0\x01N\x87\x94R\x94\x87\x94t\x94j,\x02\x00\x00hiKWK\xa2K\x01\x87\x94R\x94hiM\x0c\x01M\x9a\x01K\x01\x87\x94R\x94\x87\x94\x87\x94h\xecj\x06\x02\x00\x00(j\t\x02\x00\x00(}\x94(\x8c&where-df183981e487344ef00de00a13380c1a\x94\x8c8open_dataset-hurs-where-df183981e487344ef00de00a13380c1a\x94jV\x02\x00\x00(j\x0e\x02\x00\x00\x8c\x13__dask_blockwise__0\x94j\x11\x02\x00\x00\x8c\x13__dask_blockwise__2\x94\x8c\x13__dask_blockwise__3\x94\x87\x94\x8c\x13__dask_blockwise__1\x94t\x94ujU\x02\x00\x00(\x8c\x13__dask_blockwise__0\x94\x8c\x13__dask_blockwise__1\x94\x8c\x13__dask_blockwise__2\x94\x8c\x13__dask_blockwise__3\x94t\x94\x8c6subgraph_callable-a60257f1-d859-4b71-8ad6-8726b8dc8f9c\x94t\x94R\x94\x8c&array-1422ca8216e3c787c775e1234d9786be\x94K\x00K\x00\x87\x94j(\x01\x00\x00(\x97h)j/\x01\x00\x00t\x94R\x94jx\x01\x00\x00hiK\x00K2N\x87\x94R\x94hiK\x00K\xf0N\x87\x94R\x94hiK\x00M\xe0\x01N\x87\x94R\x94\x87\x94t\x94j,\x02\x00\x00hiKWK\xa2K\x01\x87\x94R\x94hiM\x0c\x01M\x9a\x01K\x01\x87\x94R\x94\x87\x94\x87\x94h\xe3j\x06\x02\x00\x00(j\t\x02\x00\x00(}\x94(\x8c&where-e7b7a3500f68c2a0bc7aacbc89dc5b7e\x94\x8c:open_dataset-tasmax-where-e7b7a3500f68c2a0bc7aacbc89dc5b7e\x94jy\x02\x00\x00(j\x0e\x02\x00\x00\x8c\x13__dask_blockwise__0\x94j\x11\x02\x00\x00\x8c\x13__dask_blockwise__2\x94\x8c\x13__dask_blockwise__3\x94\x87\x94\x8c\x13__dask_blockwise__1\x94t\x94ujx\x02\x00\x00(\x8c\x13__dask_blockwise__0\x94\x8c\x13__dask_blockwise__1\x94\x8c\x13__dask_blockwise__2\x94\x8c\x13__dask_blockwise__3\x94t\x94\x8c6subgraph_callable-9b04d546-3654-493a-9461-b45f25edd4c7\x94t\x94R\x94\x8c&array-1422ca8216e3c787c775e1234d9786be\x94K\x00K\x00\x87\x94j(\x01\x00\x00(\x97h)j/\x01\x00\x00t\x94R\x94j\xbe\x01\x00\x00hiK\x00K2N\x87\x94R\x94hiK\x00K\xf0N\x87\x94R\x94hiK\x00M\xe0\x01N\x87\x94R\x94\x87\x94t\x94j,\x02\x00\x00hiKWK\xa2K\x01\x87\x94R\x94hiM\x0c\x01M\x9a\x01K\x01\x87\x94R\x94\x87\x94\x87\x94h\xe0j\x06\x02\x00\x00(j\t\x02\x00\x00(}\x94(\x8c&where-3364e17170808f0a44a64772d6095a09\x94\x8c:open_dataset-tasmin-where-3364e17170808f0a44a64772d6095a09\x94j\x9c\x02\x00\x00(j\x0e\x02\x00\x00\x8c\x13__dask_blockwise__0\x94j\x11\x02\x00\x00\x8c\x13__dask_blockwise__2\x94\x8c\x13__dask_blockwise__3\x94\x87\x94\x8c\x13__dask_blockwise__1\x94t\x94uj\x9b\x02\x00\x00(\x8c\x13__dask_blockwise__0\x94\x8c\x13__dask_blockwise__1\x94\x8c\x13__dask_blockwise__2\x94\x8c\x13__dask_blockwise__3\x94t\x94\x8c6subgraph_callable-23355fd4-02c7-4ee7-bbb6-e726b945770e\x94t\x94R\x94\x8c&array-1422ca8216e3c787c775e1234d9786be\x94K\x00K\x00\x87\x94j(\x01\x00\x00(\x97h)j/\x01\x00\x00t\x94R\x94jU\x01\x00\x00hiK\x00K2N\x87\x94R\x94hiK\x00K\xf0N\x87\x94R\x94hiK\x00M\xe0\x01N\x87\x94R\x94\x87\x94t\x94j,\x02\x00\x00hiKWK\xa2K\x01\x87\x94R\x94hiM\x0c\x01M\x9a\x01K\x01\x87\x94R\x94\x87\x94\x87\x94h\xe6j\x06\x02\x00\x00(j\t\x02\x00\x00(}\x94(\x8c&where-f6e983e92a339beb3e600d18d0e3aed4\x94\x8c7open_dataset-tas-where-f6e983e92a339beb3e600d18d0e3aed4\x94j\xbf\x02\x00\x00(j\x0e\x02\x00\x00\x8c\x13__dask_blockwise__0\x94j\x11\x02\x00\x00\x8c\x13__dask_blockwise__2\x94\x8c\x13__dask_blockwise__3\x94\x87\x94\x8c\x13__dask_blockwise__1\x94t\x94uj\xbe\x02\x00\x00(\x8c\x13__dask_blockwise__0\x94\x8c\x13__dask_blockwise__1\x94\x8c\x13__dask_blockwise__2\x94\x8c\x13__dask_blockwise__3\x94t\x94\x8c6subgraph_callable-ea3136b1-49d2-40cd-869b-6724a5e0b364\x94t\x94R\x94\x8c&array-1422ca8216e3c787c775e1234d9786be\x94K\x00K\x00\x87\x94j(\x01\x00\x00(\x97h)j/\x01\x00\x00t\x94R\x94j\x9b\x01\x00\x00hiK\x00K2N\x87\x94R\x94hiK\x00K\xf0N\x87\x94R\x94hiK\x00M\xe0\x01N\x87\x94R\x94\x87\x94t\x94j,\x02\x00\x00hiKWK\xa2K\x01\x87\x94R\x94hiM\x0c\x01M\x9a\x01K\x01\x87\x94R\x94\x87\x94\x87\x94h\xddj\x06\x02\x00\x00(j\t\x02\x00\x00(}\x94(\x8c&where-f7d3ba28d944ce3d466707f1b5c811a1\x94\x8c6open_dataset-RN-where-f7d3ba28d944ce3d466707f1b5c811a1\x94j\xe2\x02\x00\x00(j\x0e\x02\x00\x00\x8c\x13__dask_blockwise__0\x94j\x11\x02\x00\x00\x8c\x13__dask_blockwise__2\x94\x8c\x13__dask_blockwise__3\x94\x87\x94\x8c\x13__dask_blockwise__1\x94t\x94uj\xe1\x02\x00\x00(\x8c\x13__dask_blockwise__0\x94\x8c\x13__dask_blockwise__1\x94\x8c\x13__dask_blockwise__2\x94\x8c\x13__dask_blockwise__3\x94t\x94\x8c6subgraph_callable-9ccfb2bd-36d1-4ee8-968f-73288e3c1585\x94t\x94R\x94\x8c&array-1422ca8216e3c787c775e1234d9786be\x94K\x00K\x00\x87\x94j(\x01\x00\x00(\x97h_)j/\x01\x00\x00t\x94R\x94h\xedhiK\x00K2N\x87\x94R\x94hiK\x00K\xf0N\x87\x94R\x94hiK\x00M\xe0\x01N\x87\x94R\x94\x87\x94t\x94j,\x02\x00\x00hiKWK\xa2K\x01\x87\x94R\x94hiM\x0c\x01M\x9a\x01K\x01\x87\x94R\x94\x87\x94\x87\x94uubsubsb.', b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 0, 0, 0, 0, 0, 0, 0), 0: 0},), bytearray(b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x04\x00\x00\xc0\x7f\xc4\x04\x00\x00\xc0\x7f\xc4\x04\x00\x00\xc0\x7f\xc4\x04\x00\x00\xc0\x7f\xc4\x04\x00\x00\xc0\x7f\xc4\x04\x00\x00\xc0\x7f\xc4\x04\x00\x00\xc0\x7f\xa4keys\x97\xd97('store-map-8110f8a87566644466652c0be4bbe893', 0, 0, 0)\xd97('store-map-f9332c8ad40b6d25083dd4274d7ee267', 0, 0, 0)\xd97('store-map-b445f0e342eb3f8f354c17df8790def4', 0, 0, 0)\xd97('store-map-104486d3d4cc7d6a1f9f2c6ca63716e7', 0, 0, 0)\xd97('store-map-2115d073e2cdba223ee5cd937cd165ca', 0, 0, 0)\xd97('store-map-a382403fc5ee803faaf017ba1fc2372c', 0, 0, 0)\xd97('store-map-5a30739e6953f4f72579fdc9f3ecb385', 0, 0, 0)\xb1internal_priority\xc0\xafsubmitting_task\xc0\xacfifo_timeout\xa360s\xa6actors\xc0\xa4code\x81\xab__Pickled__\x01\xabannotations\x81\xab__Pickled__\x02"))>
Traceback (most recent call last):
File "/home/celestin/anaconda3/lib/python3.11/site-packages/distributed/core.py", line 924, in _handle_comm
result = await result
^^^^^^^^^^^^
File "/home/celestin/anaconda3/lib/python3.11/site-packages/distributed/scheduler.py", line 5449, in add_client
await self.handle_stream(comm=comm, extra={"client": client})
File "/home/celestin/anaconda3/lib/python3.11/site-packages/distributed/core.py", line 977, in handle_stream
msgs = await comm.read()
^^^^^^^^^^^^^^^^^
File "/home/celestin/anaconda3/lib/python3.11/site-packages/distributed/comm/tcp.py", line 254, in read
msg = await from_frames(
^^^^^^^^^^^^^^^^^^
File "/home/celestin/anaconda3/lib/python3.11/site-packages/distributed/comm/utils.py", line 100, in from_frames
res = _from_frames()
^^^^^^^^^^^^^^
File "/home/celestin/anaconda3/lib/python3.11/site-packages/distributed/comm/utils.py", line 83, in _from_frames
return protocol.loads(
^^^^^^^^^^^^^^^
File "/home/celestin/anaconda3/lib/python3.11/site-packages/distributed/protocol/core.py", line 158, in loads
return msgpack.loads(
^^^^^^^^^^^^^^
File "/home/celestin/anaconda3/lib/python3.11/site-packages/msgpack/fallback.py", line 136, in unpackb
raise ExtraData(ret, unpacker._get_extradata())
msgpack.exceptions.ExtraData: unpack(b) received extra data.
CancelledError Traceback (most recent call last)
Cell In[48], line 1
----> 1 clipped_ds.to_netcdf('clipped_annual_data.nc')
File ~/anaconda3/lib/python3.11/site-packages/xarray/core/dataset.py:1957, in Dataset.to_netcdf(self, path, mode, format, group, engine, encoding, unlimited_dims, compute, invalid_netcdf)
1954 encoding = {}
1955 from xarray.backends.api import to_netcdf
-> 1957 return to_netcdf( # type: ignore # mypy cannot resolve the overloads:(
1958 self,
1959 path,
1960 mode=mode,
1961 format=format,
1962 group=group,
1963 engine=engine,
1964 encoding=encoding,
1965 unlimited_dims=unlimited_dims,
1966 compute=compute,
1967 multifile=False,
1968 invalid_netcdf=invalid_netcdf,
1969 )
File ~/anaconda3/lib/python3.11/site-packages/xarray/backends/api.py:1281, in to_netcdf(dataset, path_or_file, mode, format, group, engine, encoding, unlimited_dims, compute, multifile, invalid_netcdf)
1278 if multifile:
1279 return writer, store
-> 1281 writes = writer.sync(compute=compute)
1283 if isinstance(target, BytesIO):
1284 store.sync()
File ~/anaconda3/lib/python3.11/site-packages/xarray/backends/common.py:178, in ArrayWriter.sync(self, compute, chunkmanager_store_kwargs)
175 if chunkmanager_store_kwargs is None:
176 chunkmanager_store_kwargs = {}
--> 178 delayed_store = chunkmanager.store(
179 self.sources,
180 self.targets,
181 lock=self.lock,
182 compute=compute,
183 flush=True,
184 regions=self.regions,
185 **chunkmanager_store_kwargs,
186 )
187 self.sources = []
188 self.targets = []
File ~/anaconda3/lib/python3.11/site-packages/xarray/core/daskmanager.py:211, in DaskManager.store(self, sources, targets, **kwargs)
203 def store(
204 self,
205 sources: DaskArray | Sequence[DaskArray],
206 targets: Any,
207 **kwargs,
208 ):
209 from dask.array import store
--> 211 return store(
212 sources=sources,
213 targets=targets,
214 **kwargs,
215 )
File ~/anaconda3/lib/python3.11/site-packages/dask/array/core.py:1237, in store(failed resolving arguments)
1235 elif compute:
1236 store_dsk = HighLevelGraph(layers, dependencies)
-> 1237 compute_as_if_collection(Array, store_dsk, map_keys, **kwargs)
1238 return None
1240 else:
File ~/anaconda3/lib/python3.11/site-packages/dask/base.py:337, in compute_as_if_collection(cls, dsk, keys, scheduler, get, **kwargs)
335 schedule = get_scheduler(scheduler=scheduler, cls=cls, get=get)
336 dsk2 = optimization_function(cls)(dsk, keys, **kwargs)
--> 337 return schedule(dsk2, keys, **kwargs)
File ~/anaconda3/lib/python3.11/site-packages/distributed/client.py:3243, in Client.get(self, dsk, keys, workers, allow_other_workers, resources, sync, asynchronous, direct, retries, priority, fifo_timeout, actors, **kwargs)
3241 should_rejoin = False
3242 try:
-> 3243 results = self.gather(packed, asynchronous=asynchronous, direct=direct)
3244 finally:
3245 for f in futures.values():
File ~/anaconda3/lib/python3.11/site-packages/distributed/client.py:2368, in Client.gather(self, futures, errors, direct, asynchronous)
2366 except ValueError:
2367 local_worker = None
-> 2368 return self.sync(
2369 self._gather,
2370 futures,
2371 errors=errors,
2372 direct=direct,
2373 local_worker=local_worker,
2374 asynchronous=asynchronous,
2375 )
File ~/anaconda3/lib/python3.11/site-packages/distributed/utils.py:351, in SyncMethodMixin.sync(self, func, asynchronous, callback_timeout, *args, **kwargs)
349 return future
350 else:
--> 351 return sync(
352 self.loop, func, *args, callback_timeout=callback_timeout, **kwargs
353 )
File ~/anaconda3/lib/python3.11/site-packages/distributed/utils.py:418, in sync(loop, func, callback_timeout, *args, **kwargs)
416 if error:
417 typ, exc, tb = error
--> 418 raise exc.with_traceback(tb)
419 else:
420 return result
File ~/anaconda3/lib/python3.11/site-packages/distributed/utils.py:391, in sync..f()
389 future = wait_for(future, callback_timeout)
390 future = asyncio.ensure_future(future)
--> 391 result = yield future
392 except Exception:
393 error = sys.exc_info()
File ~/anaconda3/lib/python3.11/site-packages/tornado/gen.py:769, in Runner.run(self)
766 exc_info = None
768 try:
--> 769 value = future.result()
770 except Exception:
771 exc_info = sys.exc_info()
File ~/anaconda3/lib/python3.11/site-packages/distributed/client.py:2232, in Client._gather(self, futures, errors, direct, local_worker)
2230 else:
2231 raise exception.with_traceback(traceback)
-> 2232 raise exc
2233 if errors == "skip":
2234 bad_keys.add(key)
CancelledError: ('store-map-5a30739e6953f4f72579fdc9f3ecb385', 0, 0, 0)
Beta Was this translation helpful? Give feedback.
All reactions