KeyError: 'L1_METADATA_FILE'
- Dominant language
- Python
- Stars
- 39
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
Hi guys,
I am getting this error from a couple of 2014 Landsat8 images.
I installed rio-toa using pip and github but nothing works.
Any advice?
Thanks in advance, JL
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
in ()
53 creation_options=creation_options,
54 bands=[band], dst_dtype=dtype,
---> 55 processes=processes, pixel_sunangle=True)
56
57 # Just copy the metadata from source to destination in case we need it in the future.
/usr/local/lib/python3.7/dist-packages/rio_toa/reflectance.py in calculate_landsat_reflectance(src_paths, src_mtl, dst_path, rescale_factor, creation_options, bands, dst_dtype, processes, pixel_sunangle, clip)
152 """
153 mtl = toa_utils._load_mtl(src_mtl)
--> 154 metadata = mtl['L1_METADATA_FILE']
155
156 M = [metadata['RADIOMETRIC_RESCALING']
KeyError: 'L1_METADATA_FILE'
Contributor guide
Research direction
Start with the traceback in reflectance.py, especially calculate_landsat_reflectance, and inspect how _load_mtl parses the affected 2014 Landsat 8 metadata. Reproduce the error with the reported images and compare the parsed structure with the expected L1_METADATA_FILE entry. Done means identifying the cause and documenting or confirming the required next action.
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