issue_comments: 1382625582
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/pydata/xarray/issues/6854#issuecomment-1382625582 | https://api.github.com/repos/pydata/xarray/issues/6854 | 1382625582 | IC_kwDOAMm_X85SaTEu | 302469 | 2023-01-14T01:33:08Z | 2023-01-14T01:33:08Z | CONTRIBUTOR | Building against netcdf with the patch backported by @opoplawski, I now get a single failure: ``` ____ TestNCZarr.testopen_nczarr ______ [gw3] linux -- Python 3.11.1 /usr/bin/python3 zarr_obj = <zarr.core.Array '/dim2' (9,) float64 read-only> dimension_key = '_ARRAY_DIMENSIONS', try_nczarr = True def _get_zarr_dims_and_attrs(zarr_obj, dimension_key, try_nczarr): # Zarr arrays do not have dimensions. To get around this problem, we add # an attribute that specifies the dimension. We have to hide this attribute # when we send the attributes to the user. # zarr_obj can be either a zarr group or zarr array try: # Xarray-Zarr
self = <zarr.attrs.Attributes object at 0x7f697d934ad0> item = '_ARRAY_DIMENSIONS' def getitem(self, item):
/builddir/build/BUILDROOT/python-xarray-2022.12.0-1.fc38.x86_64/usr/lib/python3.11/site-packages/xarray/backends/zarr.py:819: in open_zarr ds = open_dataset( /builddir/build/BUILDROOT/python-xarray-2022.12.0-1.fc38.x86_64/usr/lib/python3.11/site-packages/xarray/backends/api.py:540: in open_dataset backend_ds = backend.open_dataset( /builddir/build/BUILDROOT/python-xarray-2022.12.0-1.fc38.x86_64/usr/lib/python3.11/site-packages/xarray/backends/zarr.py:897: in open_dataset ds = store_entrypoint.open_dataset( /builddir/build/BUILDROOT/python-xarray-2022.12.0-1.fc38.x86_64/usr/lib/python3.11/site-packages/xarray/backends/store.py:28: in open_dataset vars, attrs = store.load() /builddir/build/BUILDROOT/python-xarray-2022.12.0-1.fc38.x86_64/usr/lib/python3.11/site-packages/xarray/backends/common.py:128: in load (_decode_variable_name(k), v) for k, v in self.get_variables().items() /builddir/build/BUILDROOT/python-xarray-2022.12.0-1.fc38.x86_64/usr/lib/python3.11/site-packages/xarray/backends/zarr.py:480: in get_variables return FrozenDict( /builddir/build/BUILDROOT/python-xarray-2022.12.0-1.fc38.x86_64/usr/lib/python3.11/site-packages/xarray/core/utils.py:469: in FrozenDict return Frozen(dict(args, *kwargs)) /builddir/build/BUILDROOT/python-xarray-2022.12.0-1.fc38.x86_64/usr/lib/python3.11/site-packages/xarray/backends/zarr.py:481: in <genexpr> (k, self.open_store_variable(k, v)) for k, v in self.zarr_group.arrays() /builddir/build/BUILDROOT/python-xarray-2022.12.0-1.fc38.x86_64/usr/lib/python3.11/site-packages/xarray/backends/zarr.py:457: in open_store_variable dimensions, attributes = _get_zarr_dims_and_attrs( zarr_obj = <zarr.core.Array '/dim2' (9,) float64 read-only>
dimension_key = '_ARRAY_DIMENSIONS', try_nczarr = True
def _get_zarr_dims_and_attrs(zarr_obj, dimension_key, try_nczarr):
# Zarr arrays do not have dimensions. To get around this problem, we add
# an attribute that specifies the dimension. We have to hide this attribute
# when we send the attributes to the user.
# zarr_obj can be either a zarr group or zarr array
try:
# Xarray-Zarr
dimensions = zarr_obj.attrs[dimension_key]
except KeyError as e:
if not try_nczarr:
raise KeyError(
f"Zarr object is missing the attribute
Does that look like a problem in netcdf or a problem in xarray here? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1323734180 |