Skip to content

burst2safe fails to create SAFE for S1_035237_IW2_20151001T205958_VV_A5EC-BURST and S1_035238_IW2_20151001T210001_VV_0EAC-BURST #248

@rysug-synspective

Description

@rysug-synspective

For old products, burst2safe fails to create SAFE with two bursts, S1_035237_IW2_20151001T205958_VV_A5EC-BURST and S1_035238_IW2_20151001T210001_VV_0EAC-BURST.
A similar issue occurs with S1_035237_IW2_20151025T205958_VV_52ED-BURST and S1_035238_IW2_20151025T210001_VV_F6C9-BURST, but
there are no issues with S1_035237_IW2_20151118T205958_VV_CC01-BURST and S1_035238_IW2_20151118T210000_VV_CC01-BURST.

$ burst2safe S1_035237_IW2_20151001T205958_VV_A5EC-BURST S1_035238_IW2_20151001T210001_VV_0EAC-BURST --output-dir ./
Using granule search...
Found 2 burst(s).
Check burst group validity...
Downloading data...
Download complete.
Creating SAFE...
Traceback (most recent call last):
  File "/home/rysug/miniconda3/envs/s1_burst_latest_env/bin/burst2safe", line 10, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/rysug/miniconda3/envs/s1_burst_latest_env/lib/python3.14/site-packages/burst2safe/burst2safe.py", line 107, in main
    burst2safe(
    ~~~~~~~~~~^
        granules=args.granules,
        ^^^^^^^^^^^^^^^^^^^^^^^
    ...<8 lines>...
        work_dir=args.output_dir,
        ^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/rysug/miniconda3/envs/s1_burst_latest_env/lib/python3.14/site-packages/burst2safe/burst2safe.py", line 71, in burst2safe
    safe_path = safe.create_safe()
  File "/home/rysug/miniconda3/envs/s1_burst_latest_env/lib/python3.14/site-packages/burst2safe/safe.py", line 461, in create_safe
    self.create_safe_components()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/rysug/miniconda3/envs/s1_burst_latest_env/lib/python3.14/site-packages/burst2safe/safe.py", line 303, in create_safe_components
    swath.assemble()
    ~~~~~~~~~~~~~~^^
  File "/home/rysug/miniconda3/envs/s1_burst_latest_env/lib/python3.14/site-packages/burst2safe/swath.py", line 143, in assemble
    component.assemble()
    ~~~~~~~~~~~~~~~~~~^^
  File "/home/rysug/miniconda3/envs/s1_burst_latest_env/lib/python3.14/site-packages/burst2safe/product.py", line 292, in assemble
    self.create_general_annotation()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/rysug/miniconda3/envs/s1_burst_latest_env/lib/python3.14/site-packages/burst2safe/product.py", line 108, in create_general_annotation
    lol = ListOfListElements(list_elements, self.start_line, self.slc_lengths)
  File "/home/rysug/miniconda3/envs/s1_burst_latest_env/lib/python3.14/site-packages/burst2safe/base.py", line 50, in __init__
    self.inputs = sorted(self.inputs, key=self.get_first_time)
                  ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rysug/miniconda3/envs/s1_burst_latest_env/lib/python3.14/site-packages/burst2safe/base.py", line 62, in get_first_time
    first_time = min([datetime.fromisoformat(sub.find(self.time_field).text) for sub in element])  # type: ignore[arg-type]
ValueError: min() iterable argument is empty

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions