用h5py读取h5文件时出现ioerror

时间:2018-07-10 06:26:22

标签: h5py

问题: 我们有一个pip软件包,在安装过程中,将.h5文件复制到了用户环境中:

 '/Users/theuser/anaconda2/envs/cryolo3/lib/python2.7/site-packages/cryolo/full_yolo_backend.h5'

但是,h5py(版本2.8.0)无法读取它:

import h5py
h5py.h5f.open("/Users/theuser/anaconda2/envs/cryolo3/lib/python2.7/site-packages/cryolo/full_yolo_backend.h5")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5f.pyx", line 78, in h5py.h5f.open
IOError: Unable to open file (file read failed: time = Mon Jul  9 23:29:28 2018
, filename = '/Users/theuser/anaconda2/envs/cryolo3/lib/python2.7/site-packages/cryolo/full_yolo_backend.h5', file descriptor = 3, errno = 5, error message = 'Input/output error', buf = 0x7ffc467cf9b0, total read size = 8, bytes this sub-read = 8, bytes actually read = 18446744073709551615, offset = 0)

如果我们解压pip包并尝试加载.h5文件,则它会起作用。

两个文件的

md5sum相等。权限似乎还可以。在Red Hat中出现问题。

有什么建议吗?

最好, 托尔斯滕

0 个答案:

没有答案