-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataTree roundtrip fails on None group lookup #9960
Comments
Hi @sjperkins and @TomNicholas I tried to reproduce your example and indeed I found the same error. Zarr V3 may introduce this error. Zarr V3 does not accept to have group paths containing I am still working on it. However, I recommend installing zarr v2 if you need to temporarily solve this issue. |
Thanks for taking a look @aladinor. Interestingly enough the test case still fails if one simplifies the tree structure further import xarray
import xarray.testing as xt
import numpy as np
if __name__ == "__main__":
ds = xarray.Dataset({
"A": (("x", "y"), np.ones((128, 256))),
"B": (("y", "x"), np.ones((256, 128))*2)
})
dt = xarray.DataTree.from_dict({"a": ds, "b": ds})
import shutil
path = "/tmp/test_dt.zarr"
shutil.rmtree(path, ignore_errors=True)
dt.to_zarr(path, compute=True, mode="w")
dt2 = xarray.open_datatree(path)
xt.assert_identical(dt, dt2) |
Well, I just found that the new async implementation in Zarr V3 seems to not return the same object as in Zarr v2. Therefore, when requesting the group's dataset return Still looking for solutions. |
I've opened #9984 as a central issue tracking zarr3 compatibility for datatree |
What happened?
I'm attempting to use zarr 3.0.0 in conjunction with xarray 2025.1.1 in this PR
A roundtirpping test case started to fail
What did you expect to happen?
I would've expected the test case to succeed, but AFAICT on the
open_datatree
call to the local zarr store, one of the zarr groups resolves to None, resulting in the error below.Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
Anything else we need to know?
No response
Environment
INSTALLED VERSIONS
commit: None
python: 3.11.11 (main, Dec 4 2024, 08:55:08) [GCC 13.2.0]
python-bits: 64
OS: Linux
OS-release: 6.8.0-51-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_ZA.UTF-8
LOCALE: ('en_ZA', 'UTF-8')
libhdf5: None
libnetcdf: None
xarray: 2025.1.1
pandas: 2.2.3
numpy: 2.1.3
scipy: None
netCDF4: None
pydap: None
h5netcdf: None
h5py: None
zarr: 3.0.0
cftime: None
nc_time_axis: None
iris: None
bottleneck: None
dask: 2024.10.0
distributed: 2024.10.0
matplotlib: None
cartopy: None
seaborn: None
numbagg: None
fsspec: 2024.10.0
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 74.1.2
pip: 24.2
conda: None
pytest: 8.3.3
mypy: None
IPython: 8.29.0
sphinx: 8.1.3
The text was updated successfully, but these errors were encountered: