Resource temporarily unavailable
h5 file reading/writing issue
Dear all,
I am dealing with ifgramStack.h5 file and I am facing this error for first time, I even changed h5py from 2.10 to latest version but still this following error exist. I don't see any application to use ifgramStack.5 file and the error doesn't make sense to me. Any idea how to deal with it?
Thanks in advance for your response!
Full script that generated the error
reference_point.py /raid-kailash/maref/InSAR/Escoipe-tr76/mintpy/inputs/ifgramStack.h5 -t /raid-kailash/maref/InSAR/Escoipe-tr76/mintpy/smallbaselineApp.cfg -c /raid-kailash/maref/InSAR/Escoipe-tr76/mintpy/avgSpatialCoh.h5 --lookup /raid-kailash/maref/InSAR/Escoipe-tr76/mintpy/inputs/geometryRadar.h5
Full error message
--------------------------------------------------
reading reference info from template: /raid-kailash/maref/InSAR/Escoipe-tr76/mintpy/smallbaselineApp.cfg
input reference point in y/x: (1000, 1000)
--------------------------------------------------
calculate the temporal average of unwrapPhase in file /raid-kailash/maref/InSAR/Escoipe-tr76/mintpy/inputs/ifgramStack.h5 ...
[==================================================] lines 4214/4214 2536s / 51s
Add/update ref_x/y attribute to file: /raid-kailash/maref/InSAR/Escoipe-tr76/mintpy/inputs/ifgramStack.h5
{'REF_Y': '1000', 'REF_X': '1000'}
Traceback (most recent call last):
File "/raid-manaslu/maref/Software/python/MintPy/mintpy/smallbaselineApp.py", line 1293, in <module>
main(sys.argv[1:])
File "/raid-manaslu/maref/Software/python/MintPy/mintpy/smallbaselineApp.py", line 1275, in main
app.run(steps=inps.runSteps)
File "/raid-manaslu/maref/Software/python/MintPy/mintpy/smallbaselineApp.py", line 1046, in run
self.run_reference_point(sname)
File "/raid-manaslu/maref/Software/python/MintPy/mintpy/smallbaselineApp.py", line 486, in run_reference_point
mintpy.reference_point.main(iargs)
File "/raid-manaslu/maref/Software/python/MintPy/mintpy/reference_point.py", line 504, in main
reference_file(inps)
File "/raid-manaslu/maref/Software/python/MintPy/mintpy/reference_point.py", line 226, in reference_file
inps.outfile = ut.add_attribute(inps.file, atrNew)
File "/raid-manaslu/maref/Software/python/MintPy/mintpy/utils/utils1.py", line 556, in add_attribute
f = h5py.File(File, 'r+')
File "/raid-manaslu/maref/Software/anaconda3/envs/mintpyc/lib/python3.8/site-packages/h5py/_hl/files.py", line 533, in __init__
fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr)
File "/raid-manaslu/maref/Software/anaconda3/envs/mintpyc/lib/python3.8/site-packages/h5py/_hl/files.py", line 228, in make_fid
fid = h5f.open(name, h5f.ACC_RDWR, fapl=fapl)
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 106, in h5py.h5f.open
BlockingIOError: [Errno 11] Unable to open file (unable to lock file, errno = 11, error message = 'Resource temporarily unavailable')
Do you think it is better to modify the code according https://stackoverflow.com/questions/68457924/error-while-accessing-hdf5-file-shows-error-oserror-unable-to-open-file ?
System information
- Operating system: Linux-Ubuntu
- Python environment: conda
- MintPy version: MintPy version v1.3.2-48, date 2022-03-23
👋 Thanks for opening your first issue here! Please filled out the template with as much details as possible. We appreciate that you took the time to contribute! Make sure you read our contributing guidelines.
@mohseniaref I agree that using the Python with statement is a better option. Could you confirm if that resolves the issue you have?
Close this issue since the proposed solution is completed.