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 trying to save an xr.Dataset that I read and processed from another saved zarr file. But it fails with this error
numcodecs/vlen.pyx in numcodecs.vlen.VLenUTF8.encode()
TypeError: expected unicode string, found 3
It seems like the first time the dataset is saved, xarray/zarr is adding a VLenUTF8 filter to the encoding of one of the dimensions. If I pop the filters key from the opened dataset I can resave the file.
I can also safely save to netcdf (which makes sense since this encoding is probably ignored then).
What did you expect to happen?
I should be able to open and resave a file to zarr.
What happened?
I am trying to save an
xr.Dataset
that I read and processed from another saved zarr file. But it fails with this errorIt seems like the first time the dataset is saved, xarray/zarr is adding a
VLenUTF8
filter to the encoding of one of the dimensions. If I pop thefilters
key from the opened dataset I can resave the file.I can also safely save to netcdf (which makes sense since this encoding is probably ignored then).
What did you expect to happen?
I should be able to open and resave a file to zarr.
Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
Anything else we need to know?
No response
Environment
INSTALLED VERSIONS
commit: None
python: 3.8.5 (default, Sep 4 2020, 07:30:14)
[GCC 7.3.0]
python-bits: 64
OS: Linux
OS-release: 5.4.0-124-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.10.6
libnetcdf: 4.7.4
xarray: 2023.1.0
pandas: 1.5.3
numpy: 1.22.4
scipy: 1.4.1
netCDF4: 1.5.4
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: 2.11.0
cftime: 1.4.1
nc_time_axis: 1.2.0
PseudoNetCDF: None
rasterio: None
cfgrib: 0.9.8.5
iris: None
bottleneck: 1.3.2
dask: 2022.01.1
distributed: 2022.01.1
matplotlib: 3.3.2
cartopy: 0.18.0
seaborn: None
numbagg: None
fsspec: 0.8.4
cupy: None
pint: 0.16.1
sparse: None
flox: None
numpy_groupies: None
setuptools: 50.3.0.post20201006
pip: 20.2.3
conda: None
pytest: 7.0.1
mypy: None
IPython: 7.18.1
sphinx: None
The text was updated successfully, but these errors were encountered: