ioerror when reading h5 file with h5py

2,367 views
Skip to first unread message

thorsten...@googlemail.com

unread,
Jul 10, 2018, 6:12:25 AM7/10/18
to h5py

The problem: We have a pip package where during installation a .h5 file is copied to the a user environment:


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

However, h5py (version 2.8.0) cannot read it:


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)


If we untar the pip package and try to load the .h5 file it works.


md5sum is equal for both files. Permissions seems to be OK. Problem occurs in Red Hat.


Any suggestions?


Best, Thorsten

thorsten...@googlemail.com

unread,
Jul 10, 2018, 10:21:02 AM7/10/18
to h5py
Here are some further information about the system:

Summary of the h5py configuration
---------------------------------

h5py    2.8.0
HDF5    1.10.2
Python  2.7.15 |Anaconda, Inc.| (default, May  1 2018, 23:32:55) 
[GCC 7.2.0]
sys.platform    linux2
sys.maxsize     9223372036854775807
numpy   1.14.5

Red Hat Enterprise Linux Server release 7.5 (Maipo)

Thomas Caswell

unread,
Jul 10, 2018, 1:41:06 PM7/10/18
to h5...@googlegroups.com
Are you sure that the permissions are correct? 

--
You received this message because you are subscribed to the Google Groups "h5py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h5py+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

thorsten...@googlemail.com

unread,
Jul 11, 2018, 1:40:45 AM7/11/18
to h5py
Hi Thomas,

to make sure, that the permissions are correct we applied:
chmod -R 777 /Users/theuser/anaconda2

The error still occurs.

Best,
Thorsten

thorsten...@googlemail.com

unread,
Jul 14, 2018, 5:09:16 AM7/14/18
to h5py
Finally solved the issue. I had to deactivate file locking with
os.environ["HDF5_USE_FILE_LOCKING"] = "FALSE"
Reply all
Reply to author
Forward
0 new messages