Skip to content

Commit

Permalink
Tolerate Zarr V3 module path name change
Browse files Browse the repository at this point in the history
  • Loading branch information
ghidalgo3 committed Jul 10, 2024
1 parent 8b61c5d commit 8f61ebf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kerchunk/hdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from fsspec.implementations.reference import LazyReferenceMapper
import numpy as np
import zarr
from zarr.meta import encode_fill_value
import numcodecs

from .codecs import FillStringsCodec
Expand All @@ -22,6 +21,12 @@
"for more details."
)

try:
from zarr.meta import encode_fill_value
except ModuleNotFoundError:
# https://github.com/zarr-developers/zarr-python/issues/2021
from zarr.v2.meta import encode_fill_value

lggr = logging.getLogger("h5-to-zarr")
_HIDDEN_ATTRS = { # from h5netcdf.attrs
"REFERENCE_LIST",
Expand Down

0 comments on commit 8f61ebf

Please sign in to comment.