Skip to content

update attribute error when running remove_ramp.py on binary data file #861

@bjmarfito

Description

@bjmarfito

Description of the problem

The remove_ramp.py produces an error when I include a mask file generated from generate_mask.py.

Full script that generated the error

(isce2expe) [bryanjim001@hpc-gekko1 insar]$ remove_ramp.py geo_filt_msk.unw -m geo_unw.msk -s linear -o geo_filt_msk_deramped.unw

Full error message

remove linear ramp from file: geo_filt_msk.unw
read mask file: geo_unw.msk
writing >>> geo_filt_msk_deramped.unw
write file: geo_filt_msk_deramped.unw
write file: geo_filt_msk_deramped.unw.rsc
add/update the following metadata to file:
Traceback (most recent call last):
  File "/home/bryanjim001/tools/MintPy/mintpy/cli/remove_ramp.py", line 150, in <module>
    main(sys.argv[1:])
  File "/home/bryanjim001/tools/MintPy/mintpy/cli/remove_ramp.py", line 137, in main
    ut.run_deramp(
  File "/home/bryanjim001/tools/MintPy/mintpy/utils/utils1.py", line 902, in run_deramp
    add_attribute(out_file, extra_meta, print_msg=True)
  File "/home/bryanjim001/tools/MintPy/mintpy/utils/utils1.py", line 570, in add_attribute
    with h5py.File(File, 'r+') as f:
  File "/home/bryanjim001/.conda/envs/isce2expe/lib/python3.9/site-packages/h5py/_hl/files.py", line 533, in __init__
    fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr)
  File "/home/bryanjim001/.conda/envs/isce2expe/lib/python3.9/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
OSError: Unable to open file (file signature not found)

System information

  • Operating system: CentOS 7
  • Python environment: conda
  • MintPy version: b71a6cf
  • Your custom / default template file (if the bug is related to a specific dataset): N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions