You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am looking into the following error when opening a zarr file with xr.open_zarr:
/opt/homebrew/Caskroom/miniconda/base/envs/climate-analysis/lib/python3.8/site-packages/zarr/core.py:1886: in _process_chunk
self._compressor.decode(cdata, dest)
numcodecs/blosc.pyx:562: in numcodecs.blosc.Blosc.decode
ValueError: destination buffer too small; expected at least 16, got 8
I have created a file on a Linux server and copied it to my local Mac. My code runs just fine on the server but breaks with the above error locally. My current hypothesis is that the zarr file was saved with a blocksize of 16 - I am not 100% what that means - but I am not able to open it like that. In any case, this is for a test so I was wondering whether I could change the default compressor setting of blocksize=0=automatic to 8 so I can use the same test data locally and on the server without changing the code in production.
In other words, I am thinking about running it maybe inside a context like:
withzarr.compressor.blosc.set_blocksize(8):
...
or monkeypatch it like this
blosc.blocksize=8
There is a chance I am completely wrong and the problem is actually somewhere else but this is my best guess.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am looking into the following error when opening a zarr file with
xr.open_zarr
:I have created a file on a Linux server and copied it to my local Mac. My code runs just fine on the server but breaks with the above error locally. My current hypothesis is that the zarr file was saved with a blocksize of 16 - I am not 100% what that means - but I am not able to open it like that. In any case, this is for a test so I was wondering whether I could change the default compressor setting of blocksize=0=automatic to 8 so I can use the same test data locally and on the server without changing the code in production.
In other words, I am thinking about running it maybe inside a context like:
or monkeypatch it like this
There is a chance I am completely wrong and the problem is actually somewhere else but this is my best guess.
Beta Was this translation helpful? Give feedback.
All reactions