smallbaselineApp.py failed at load_data

486 views
Skip to first unread message

Guo Cheng

unread,
May 3, 2021, 12:09:26 AM5/3/21
to MintPy
Hi Yunjun,

I have previously used mintpy to process a stack of Sentinel-1 interferograms, obtained via the ISCE command stackSentinel.py, and smallbaselineApp.py successfully generates the InSAR timeseries.

Recently I recreate the stack with updated interferograms. Although, the ISCE process finished with success, I ran into the following error after executing smallbaselineApp.py (version v1.3.0-12):

******************** step - load_data ********************

load_data.py --template /data/not_backed_up/gcheng6/Makran/InSAR/p151b/mintpy/smallbaselineApp.cfg /data/not_backed_up/gcheng6/Makran/InSAR/p151b/mintpy/MakranSenDT151.txt --project MakranSenDT151
processor : isce
SAR platform/sensor : Sen
--------------------------------------------------
prepare metadata files for isce products
prep_isce.py -m ../reference/IW1.xml -g ../merged/geom_reference -b ../baselines -d ../merged/interferograms -f filt_*.unw
extract metadata from ISCE/topsStack xml file: ../reference/IW1.xml
This is the Open Source version of ISCE.
Some of the workflows depend on a separate licensed package.
To obtain the licensed package, please make a request for ISCE
Alternatively, if you are a member, or can become a member of WinSAR
you may be able to obtain access to a version of the licensed sofware at
/home/gcheng6/tools/MintPy/mintpy/load_data.py:666: UserWarning: prep_isce.py failed. Assuming its result exists and continue...
  warnings.warn('prep_isce.py failed. Assuming its result exists and continue...')
--------------------------------------------------
searching interferometric pairs info
input data files:
unwrapPhase     : ../merged/interferograms/*/filt_*.unw
coherence       : ../merged/interferograms/*/filt_*.cor
connectComponent: ../merged/interferograms/*/filt_*.unw.conncomp
number of unwrapPhase     : 423
number of coherence       : 423
number of connectComponent: 423
Traceback (most recent call last):
  File "/home/gcheng6/tools/MintPy/mintpy/smallbaselineApp.py", line 1255, in <module>
    main(sys.argv[1:])
  File "/home/gcheng6/tools/MintPy/mintpy/smallbaselineApp.py", line 1237, in main
    app.run(steps=inps.runSteps)
  File "/home/gcheng6/tools/MintPy/mintpy/smallbaselineApp.py", line 1029, in run
    self.run_load_data(sname)
  File "/home/gcheng6/tools/MintPy/mintpy/smallbaselineApp.py", line 343, in run_load_data
    mintpy.load_data.main(iargs)
  File "/home/gcheng6/tools/MintPy/mintpy/load_data.py", line 778, in main
    stackObj = read_inps_dict2ifgram_stack_dict_object(iDict)
  File "/home/gcheng6/tools/MintPy/mintpy/load_data.py", line 430, in read_inps_dict2ifgram_stack_dict_object
    date12 = readfile.read_attribute(dsPath)['DATE12'].replace('_','-')
KeyError: 'DATE12'  

I do not know what could cause this error. The only difference I see between the old and new IFG stacks is that the new stack does not have the .rsc files in the corresponding directories (e.g. geom_reference, interferograms, .etc) . I have attached my template file.

Any suggestion is appreciated!

Guo 
MakranSenDT151.txt

Zhang Yunjun

unread,
May 3, 2021, 12:15:32 AM5/3/21
to min...@googlegroups.com
Hi Guo,

As you have pointed out, the *.rsc file is not successfully generated by prep_isce.py command. You would need to re-run prep_isce.py command manually to check more details.

Yunjun

--
You received this message because you are subscribed to the Google Groups "MintPy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mintpy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mintpy/d9c769ab-fe9a-4530-9467-8a44788de93an%40googlegroups.com.
<MakranSenDT151.txt>

Guo Cheng

unread,
May 3, 2021, 1:58:08 PM5/3/21
to MintPy
Hi Yunjun,

Thanks for the quick response. I have manually ran prep_isce.py:

prep_isce.py -m ../reference/IW1.xml -g ../merged/geom_reference -b ../baselines -d ../merged/interferograms -f filt_*.unw

And it returns the following error:

extract metadata from ISCE/topsStack xml file: ../reference/IW1.xml
This is the Open Source version of ISCE.
Some of the workflows depend on a separate licensed package.
To obtain the licensed package, please make a request for ISCE
Alternatively, if you are a member, or can become a member of WinSAR
you may be able to obtain access to a version of the licensed sofware at
Traceback (most recent call last):
  File "/home/gcheng6/tools/MintPy/mintpy/prep_isce.py", line 226, in <module>
    main(sys.argv[1:])
  File "/home/gcheng6/tools/MintPy/mintpy/prep_isce.py", line 193, in main
    metadata = isce_utils.extract_isce_metadata(inps.metaFile,
  File "/home/gcheng6/tools/MintPy/mintpy/utils/isce_utils.py", line 96, in extract_isce_metadata
    meta, frame = extract_tops_metadata(meta_file)
  File "/home/gcheng6/tools/MintPy/mintpy/utils/isce_utils.py", line 138, in extract_tops_metadata
    obj = load_product(xml_file)
  File "/home/gcheng6/tools/MintPy/mintpy/utils/isce_utils.py", line 75, in load_product
    pm.configure()
  File "/home/gcheng6/Software/Anaconda3/envs/isce/lib/python3.7/site-packages/isce/components/iscesys/Component/Configurable.py", line 1464, in configure
    self._configureThis()
  File "/home/gcheng6/Software/Anaconda3/envs/isce/lib/python3.7/site-packages/isce/components/iscesys/Component/Configurable.py", line 1567, in _configureThis
    self.init(self.catalog,self._dictionaryOfFacilities,unitsDict,docDict)
  File "/home/gcheng6/Software/Anaconda3/envs/isce/lib/python3.7/site-packages/isce/components/iscesys/Component/Configurable.py", line 695, in init
    DU.updateDictionary(self._dictionaryOfFacilities,factDict,replace=True,spare='doc')
  File "/home/gcheng6/Software/Anaconda3/envs/isce/lib/python3.7/site-packages/isce/components/iscesys/DictUtils/DictUtils.py", line 84, in updateDictionary
    for k2,v2 in dict2.items():
RuntimeError: dictionary keys changed during iteration

I found an issue on the github page that describes the same error message as that in my first message (#429), but since I have updated mintpy recently, I do not know why the error still occurs.

Guo

Zhang Yunjun

unread,
May 5, 2021, 12:44:36 AM5/5/21
to MintPy
Hi Guo,

The IW*.xml file is not loaded properly using the ISCE module. I suspect the XML file is somehow corrupted. I would recommend re-generate this XML file or ask the question in the ISCE forum.

Yunjun
Reply all
Reply to author
Forward
0 new messages