maawoo/gedixr

KeyError: "Unable to synchronously open object (object 'shot_number' doesn't exist)"

Closed this issue · 1 comments

maawoo commented

For some files the following error is logged:

[2023-08-19 11:03:46,363] [   ERROR] processed_GEDI02_B_2020161044805_O08446_01_T03436_02_003_01_V002.h5 -- "Unable to synchronously open object (object 'shot_number' doesn't exist)"
Traceback (most recent call last):
  File "/Users/marcowo/Documents/pypypy/gedixr/gedixr/gedi.py", line 107, in extract_data
    df = pd.DataFrame(_from_l2b(gedi_file=gedi, beams=beams, acq_time=date))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/marcowo/Documents/pypypy/gedixr/gedixr/gedi.py", line 233, in _from_l2b
    [shot.append(str(h)) for h in gedi_file[f'{beam}/shot_number'][()]]
                                  ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "/Users/marcowo/mambaforge/envs/gedixr/lib/python3.11/site-packages/h5py/_hl/group.py", line 357, in __getitem__
    oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5o.pyx", line 190, in h5py.h5o.open
KeyError: "Unable to synchronously open object (object 'shot_number' doesn't exist)"

Needs to be investigated. Only happening for L2B files or also L2A? Is it a problem with the files themselves or with the h5py package?

Checked some failed files manually. They seem to be corrupted and are missing several data columns. The error is handled and logged, so nothing else I can do...