Anaconda jupyter-notebook 遇到HDF5-DIAG问题

Anaconda jupyter-notebook 问题

 ds = xarray.open_mfdataset('/path/to/files/*.nc') 遇到提示HDF5-DIAG问题

netcdf - HDF5 Warnings When Accessing Xarray DataSet - Stack Overflow

HDF5 error when opening .nc files in python with xarray - Stack Overflow

HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
  #000: H5A.c line 528 in H5Aopen_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 130 in H5VL__native_attr_open(): can't open attribute
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
    major: Attribute
    minor: Unable to initialize object
  #005: H5Oattribute.c line 494 in H5O__attr_open_by_name(): can't locate attribute: '_QuantizeBitGroomNumberOfSignificantDigits'
    major: Attribute
    minor: Object not found

原因

conda install h5netcdf 与 pip install h5netcdf 相互冲突

conda remove 库名 或 pip uninstall 包名

通过删除pip安装的包来解决包冲突

pip uninstall pip

将所有的pip 安装及安装包删除

Good question, these may be exceptions, but are definitely appearing unprompted with no loggers or other requests being made. While I understand the value in a minimal reproducible example, I'm beginning to think that there may be some package version compatibility issues among HDF5 and it's dependents within my working environment. 

– jpolly

 Jul 1 at 13:00 

The warnings shown have gone away when letting conda solve all the dependencies of packages within my environment. Previously I was manually pip installing most of the packages (xarray, netcdf4, rioxarray, etc.) in my environment. This approach resulted in the errors described above. I don't know if this constitutes an "answer" to the question, but conda installing these packages has fixed the issue, resulting in no warnings. 

– jpolly

 Jul 1 at 19:37

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值