diff --git a/CHANGES.md b/CHANGES.md index 0d6dabdf..caf3574f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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)) diff --git a/eoreader/products/optical/s2_product.py b/eoreader/products/optical/s2_product.py index eefb49b7..c807f16b 100644 --- a/eoreader/products/optical/s2_product.py +++ b/eoreader/products/optical/s2_product.py @@ -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."