Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource temporarily unavailable #855

Closed
mohseniaref opened this issue Sep 25, 2022 · 3 comments
Closed

Resource temporarily unavailable #855

mohseniaref opened this issue Sep 25, 2022 · 3 comments
Labels
closing-soon-if-no-response If no response occurs within a few days, the issue will be closed.

Comments

@mohseniaref
Copy link
Contributor

mohseniaref commented Sep 25, 2022

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
@welcome
Copy link

welcome bot commented Sep 25, 2022

👋 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.

@yunjunz
Copy link
Member

yunjunz commented Sep 30, 2022

@mohseniaref I agree that using the Python with statement is a better option. Could you confirm if that resolves the issue you have?

@yunjunz yunjunz added the closing-soon-if-no-response If no response occurs within a few days, the issue will be closed. label Oct 1, 2022
yunjunz added a commit that referenced this issue Oct 1, 2022
+ rename `bulk_plate_motion` to `plate_motion`: including changes in:
   - `mintpy.plate_motion.py`
   - `mintpy.cli.plate_motion.py`
   - `mintpy.__main__`
   - `setup.py`

+ `utils.readfile.read()`: add `no_data_values` arg to be able to convert the no-data-value from one number to another number.

+ `utils.network`: del the obsolete `igram_perp_baseline_list()` function

+ use the Python context manager `with` statement to better control the HDF5 file handle/lock (#855).
@yunjunz
Copy link
Member

yunjunz commented Nov 2, 2022

Close this issue since the proposed solution is completed.

@yunjunz yunjunz closed this as completed Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing-soon-if-no-response If no response occurs within a few days, the issue will be closed.
Projects
None yet
Development

No branches or pull requests

2 participants