-
Notifications
You must be signed in to change notification settings - Fork 299
Description
Describe the bug
The use of smallbaselineApp on Hyp3-generated interferograms does not require .xml files. However, the presence of a .tif.xml file, which can be automatically generated by opening a .tif file with QGIS, confuses the smallbaselineApp and generates this bug:
File "...", line ..., in read_isce_xml for child in meta.findall("MDI"):
AttributeError: 'NoneType' object has no attribute 'findall'
The bug can only be fixed after all .tif.xml files are deleted.
To Reproduce
Steps to reproduce the behavior:
From the data folder open a unw_phase_clipped.tif with QGIS, and remove it from QGIS. This generates a .tif.xml file in the same folder. Run **!smallbaselineApp.py --dir {work_dir} {mintpy_config}_** will show you the error
Expected behavior
smallbaselineApp.py is disrupted. The task terminates. The bug can only be fixed after all .tif.xml files in the data folder system are deleted.
Additional context
I am using Jupyter Notebook, Python 3.9 or 3.10.
Full error message
Traceback (most recent call last):
File "/DATA/DATA5/mengze/miniconda3/envs/isce_2/bin/smallbaselineApp.py", line 10, in
sys.exit(main())
File "/DATA/DATA5/mengze/miniconda3/envs/isce_2/lib/python3.10/site-packages/mintpy/cli/smallbaselineApp.py", line 209, in main
run_smallbaselineApp(inps)
File "/DATA/DATA5/mengze/miniconda3/envs/isce_2/lib/python3.10/site-packages/mintpy/smallbaselineApp.py", line 1155, in run_smallbaselineApp
app.run(steps=inps.runSteps)
File "/DATA/DATA5/mengze/miniconda3/envs/isce_2/lib/python3.10/site-packages/mintpy/smallbaselineApp.py", line 908, in run
self.run_load_data(sname)
File "/DATA/DATA5/mengze/miniconda3/envs/isce_2/lib/python3.10/site-packages/mintpy/smallbaselineApp.py", line 176, in run_load_data
mintpy.cli.load_data.main(iargs)
File "/DATA/DATA5/mengze/miniconda3/envs/isce_2/lib/python3.10/site-packages/mintpy/cli/load_data.py", line 121, in main
load_data(inps)
File "/DATA/DATA5/mengze/miniconda3/envs/isce_2/lib/python3.10/site-packages/mintpy/load_data.py", line 833, in load_data
geom_geo_obj, geom_radar_obj = read_inps_dict2geometry_dict_object(iDict, geom_dset_name2template_key)
File "/DATA/DATA5/mengze/miniconda3/envs/isce_2/lib/python3.10/site-packages/mintpy/load_data.py", line 494, in read_inps_dict2geometry_dict_object
atr = readfile.read_attribute(obsFiles[0])
File "/DATA/DATA5/mengze/miniconda3/envs/isce_2/lib/python3.10/site-packages/mintpy/utils/readfile.py", line 1261, in read_attribute
atr.update(read_isce_xml(xml_files[0]))
File "/DATA/DATA5/mengze/miniconda3/envs/isce_2/lib/python3.10/site-packages/mintpy/utils/readfile.py", line 1635, in read_isce_xml
for child in meta.findall("MDI"):
AttributeError: 'NoneType' object has no attribute 'findall'
System information
- Operating system:
- Python environment:
- MintPy version:
- InSAR processor/product:
- Your custom / default template file (if the bug is related to a specific dataset):