isce-framework / isce-framework/s1-reader
[Bug]: `ET.parse(orbit_path)` FileNotFoundError
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Checked for duplicates
Yes - I've already checked. Found by Ozzy Tirmizi.
Describe the bug
>>> bursts = s1reader.load_bursts(zip_path, orbit_path, swath_num=2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/yunjunz/tools/s1-reader/src/s1reader/s1_reader.py", line 476, in load_bursts
bursts = _burst_from_zip(path, id_str, orbit_path)
File "/Users/yunjunz/tools/s1-reader/src/s1reader/s1_reader.py", line 536, in _burst_from_zip
bursts = burst_from_xml(f_annotation, orbit_path, f_tiff, iw2_f_annotation, z_file.open)
File "/Users/yunjunz/tools/s1-reader/src/s1reader/s1_reader.py", line 339, in burst_from_xml
orbit_tree = ET.parse(orbit_path)
File "/Users/yunjunz/tools/miniconda3/envs/opera/lib/python3.10/xml/etree/ElementTree.py", line 1229, in parse
tree.parse(source, parser)
File "/Users/yunjunz/tools/miniconda3/envs/opera/lib/python3.10/xml/etree/ElementTree.py", line 569, in parse
source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: ''
>>>
What did you expect?
I expected [...]
Reproducible steps
import s1reader
zip_file = './SLC/S1A_IW_SLC__1SSV_20160829T230628_20160829T230655_012821_014394_A1F0.zip'
orbit_dir = './orbits'
orbit_path = s1reader.get_orbit_file_from_dir(zip_path, orbit_dir)
bursts = s1reader.load_bursts(zip_path, orbit_path, swath_num=2)
Environment
- Version of this software [e.g. vX.Y.Z]
- Operating System: [e.g. MacOSX with Docker Desktop vX.Y]
...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the call in the issue, then inspect src/s1reader/s1_reader.py at burst_from_xml (line 339), _burst_from_zip (line 536), and load_bursts (line 476), along with get_orbit_file_from_dir. Confirm why orbit_path is empty; done means load_bursts receives a valid orbit file and no longer raises FileNotFoundError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100