-
-
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
open_datatree fails for a HDF5 file over network if import netCDF4
is included
#9743
Comments
Thanks for opening your first issue here at xarray! Be sure to follow the issue template! |
@DFEvans The traceback indicates it used I remember there have been issues wrt fsspec not working over the network but locally, but can't find them atm. |
import netCDF4
is included
So, a few more bits:
|
Thanks for the details, @DFEvans.
Not sure, but you also might use the with-contextmanager with |
Might be also caused by lazy importing in xarray? |
What happened?
Attempting to open a (specific?) HDF5 file over the network via
fsspec
andxarray.open_datatree()
fails with an error inside h5py, ifimport netCDF4
occurs in the scriptWhat did you expect to happen?
The dataset opens successfully
Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
Anything else we need to know?
I see the same issue attempting to read the dataset over HTTPS and directly from S3, both on NASA's own server and in my own S3 bucket. The file opens successfully locally, and via
xarray.open_dataset
.Give me a shout if you need the file in question put somewhere, with a suggestion of a location - it's ~100MB in size.
Environment
INSTALLED VERSIONS
commit: None
python: 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0]
python-bits: 64
OS: Linux
OS-release: 5.15.153.1-microsoft-standard-WSL2
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: C.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.14.2
libnetcdf: 4.9.4-development
xarray: 2024.10.0
pandas: 2.2.2
numpy: 1.26.4
scipy: 1.14.1
netCDF4: 1.7.2
pydap: None
h5netcdf: 1.3.0
h5py: 3.11.0
zarr: 2.18.3
cftime: 1.6.4
nc_time_axis: None
iris: None
bottleneck: None
dask: 2024.8.2
distributed: None
matplotlib: 3.9.2
cartopy: None
seaborn: None
numbagg: None
fsspec: 2023.12.2
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 74.1.2
pip: 24.1.2
conda: None
pytest: 7.4.4
mypy: 1.11.2
IPython: 8.27.0
sphinx: 7.4.7
The text was updated successfully, but these errors were encountered: