Skip to content
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

Guard against haunted netCDF4/HDF5 combo #119

Merged
merged 1 commit into from
Sep 13, 2024
Merged

Conversation

benjaminhwilliams
Copy link
Member

On some platforms, it seems importing h5py before netCDF4 leads to errors like

OSError: [Errno -101] NetCDF: HDF error: '/path/to/HDF5/file.h5'

when trying to open an HDF5 file as an Xarray dataset.

This might be fixed by proper packaging, since it seems to happen when Pip installs incompatible h5py and netCDF4 packages (motivation for CondaForge feedstock, perhaps), but for now the generally accepted workaround seems just to be importing netCDF4 first.

@benjaminhwilliams benjaminhwilliams merged commit ea814a8 into main Sep 13, 2024
7 checks passed
@benjaminhwilliams benjaminhwilliams deleted the netcdf4-import branch September 13, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant