Skip to content

Commit

Permalink
Fix #142: catch StopIteration and return InvalidProductError
Browse files Browse the repository at this point in the history
  • Loading branch information
jteulade committed May 6, 2024
1 parent 54677f7 commit d9a85a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 0.21.2 (2024-mm-dd)

- FIX: `Sentinel-2` product with StopIteration error ([#142](https://github.com/sertit/eoreader/issues/142))
- ENH: `to_str` and `to_band`: add a `as_list` argument defaulting to `True`. When set as False, return a str from `to_str` and a band from `to_band` ([#138](https://github.com/sertit/eoreader/issues/138)). Thanks @jsetty!
- FIX: Fix issue with geocoding with unzipped `Sentinel-3 OLCI` product ([#137](https://github.com/sertit/eoreader/issues/137))
- FIX: Fix iceye product when extent file (*.kml) not found ([#135](https://github.com/sertit/eoreader/pull/135))
Expand Down
2 changes: 1 addition & 1 deletion eoreader/products/optical/s2_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def _get_name_constellation_specific(self) -> str:
next(self.path.glob("**/tileInfo.json")), print_file=False
)
name = tile_info["productName"]
except json.JSONDecodeError:
except (json.JSONDecodeError, StopIteration):
raise InvalidProductError(
f"Corrupted metadata and bad filename for {self.path}! "
f"Impossible to process this product."
Expand Down

0 comments on commit d9a85a7

Please sign in to comment.