Skip to content

Fix h5py version printing #3145

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

Merged
merged 2 commits into from
Jul 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions xarray/util/print_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def netcdf_and_hdf5_versions():
except ImportError:
try:
import h5py
libhdf5_version = h5py.__hdf5libversion__
libhdf5_version = h5py.version.hdf5_version
except ImportError:
pass
return [('libhdf5', libhdf5_version), ('libnetcdf', libnetcdf_version)]
Expand All @@ -77,7 +77,10 @@ def netcdf_and_hdf5_versions():
def show_versions(file=sys.stdout):
sys_info = get_sys_info()

sys_info.extend(netcdf_and_hdf5_versions())
try:
sys_info.extend(netcdf_and_hdf5_versions())
except Exception as e:
print("Error collecting netcdf / hdf5 version: {}".format(e))

deps = [
# (MODULE_NAME, f(mod) -> mod version)
Expand Down