I'm trying to open a h5 file using:
f = h5py.File('galpro/model1/posteriors/posteriors.h5', 'r')
And I get the error
BlockingIOError Traceback (most recent call last)
/tmp/ipykernel_3608836/2835026146.py in <module>
----> 1 f = h5py.File('galpro/model1/posteriors/posteriors.h5', 'a')
~/.local/lib/python3.7/site-packages/h5py/_hl/files.py in __init__(self, name, mode, driver, libver, userblock_size, swmr, rdcc_nslots, rdcc_nbytes, rdcc_w0, track_order, fs_strategy, fs_persist, fs_threshold, fs_page_size, page_buf_size, min_meta_keep, min_raw_keep, locking, **kwds)
505 fs_persist=fs_persist, fs_threshold=fs_threshold,
506 fs_page_size=fs_page_size)
--> 507 fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr)
508
509 if isinstance(libver, tuple):
~/.local/lib/python3.7/site-packages/h5py/_hl/files.py in make_fid(name, mode, userblock_size, fapl, fcpl, swmr)
230 # existing one (ACC_EXCL)
231 try:
--> 232 fid = h5f.open(name, h5f.ACC_RDWR, fapl=fapl)
233 # Not all drivers raise FileNotFoundError (commented those that do not)
234 except FileNotFoundError if fapl.get_driver() in (
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
h5py/h5f.pyx in h5py.h5f.open()
BlockingIOError: [Errno 11] Unable to open file (unable to lock file, errno = 11, error message = 'Resource temporarily unavailable')
I originally got the error:
OSError: Unable to open file (bad object header version number)
However, once I redownloaded the file it gave me the 'BlockingIOError: [Errno 11] Unable to open file (unable to lock file, errno = 11, error message = 'Resource temporarily unavailable')' error message.
I'm not sure what's wrong or how to open the file. Please help!
Nb: I found that upgrading iPython and h5py packages solved the problem
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.