Closed ilayfarimaz closed 2 years ago
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. We appreciate that you took the time to contribute! Make sure you read our contributing guidelines
I agree with you that this seems to be an issue due to the mixing of different versions of python env. More specifically, I don't think isce2 is installed in your python3.8 environment. You could run the printout prep_isce.py ...
command as test and confirm.
The upgrade of python 3.9 is planned for mintpy and on the to-do list. For now, the easy fix would be to install both isce2 and mintpy in the same conda environment under python 3.8.
Thank you for your answer. I run prep_isce.py, it works well. So I'll interpret interferograms once again under my 3.8 env.
Looking forward for 3.9 upgrade, thanks
Description of the problem I generated a stack of interferograms for my region. I ran stackSentinel.py on environment which has isce2 v.2.5.3 and python version for related environment is 3.9 When I try to load this stack into mintpy, a parsing error occurs. The environment includes mintpy has python version 3.8, which is the highest version possible. And also isce 2.5.3 is installed on this environment. I believe the inconsistency between python versions caused this error, not sure how to fix it.
Full script that generated the error
Full error message
/truba/home/ifarimaz/tools/MintPy/mintpy/load_data.py:710: UserWarning: prep_isce.py failed. Assuming its result exists and continue... warnings.warn('prep_isce.py failed. Assuming its result exists and continue...') Traceback (most recent call last): File "/truba/home/ifarimaz/miniconda3/envs/mintpy/lib/python3.8/xml/etree/ElementTree.py", line 1700, in close self.parser.Parse("", 1) # end of data xml.parsers.expat.ExpatError: no element found: line 1, column 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/truba/home/ifarimaz/miniconda3/envs/mintpy/bin/smallbaselineApp.py", line 10, in
sys.exit(main())
File "/truba/home/ifarimaz/tools/MintPy/mintpy/smallbaselineApp.py", line 1270, in main
app.run(steps=inps.runSteps)
File "/truba/home/ifarimaz/tools/MintPy/mintpy/smallbaselineApp.py", line 1035, in run
self.run_load_data(sname)
File "/truba/home/ifarimaz/tools/MintPy/mintpy/smallbaselineApp.py", line 344, in run_load_data
mintpy.load_data.main(iargs)
File "/truba/home/ifarimaz/tools/MintPy/mintpy/load_data.py", line 838, in main
stackObj = read_inps_dict2ifgram_stack_dict_object(iDict)
File "/truba/home/ifarimaz/tools/MintPy/mintpy/load_data.py", line 411, in read_inps_dict2ifgram_stack_dict_object
dsPathDict = skip_files_with_inconsistent_size(dsPathDict,
File "/truba/home/ifarimaz/tools/MintPy/mintpy/load_data.py", line 331, in skip_files_with_inconsistent_size
atr_list = [readfile.read_attribute(fname) for fname in dsPathDict[dsName]]
File "/truba/home/ifarimaz/tools/MintPy/mintpy/load_data.py", line 331, in
atr_list = [readfile.read_attribute(fname) for fname in dsPathDict[dsName]]
File "/truba/home/ifarimaz/tools/MintPy/mintpy/utils/readfile.py", line 915, in read_attribute
atr.update(read_isce_xml(xml_files[0]))
File "/truba/home/ifarimaz/tools/MintPy/mintpy/utils/readfile.py", line 1258, in read_isce_xml
root = ET.parse(fname).getroot()
File "/truba/home/ifarimaz/miniconda3/envs/mintpy/lib/python3.8/site-packages/defusedxml/common.py", line 100, in parse
return _parse(source, parser)
File "/truba/home/ifarimaz/miniconda3/envs/mintpy/lib/python3.8/xml/etree/ElementTree.py", line 1202, in parse
tree.parse(source, parser)
File "/truba/home/ifarimaz/miniconda3/envs/mintpy/lib/python3.8/xml/etree/ElementTree.py", line 602, in parse
self._root = parser.close()
File "/truba/home/ifarimaz/miniconda3/envs/mintpy/lib/python3.8/xml/etree/ElementTree.py", line 1702, in close
self._raiseerror(v)
File "/truba/home/ifarimaz/miniconda3/envs/mintpy/lib/python3.8/xml/etree/ElementTree.py", line 1602, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
System information