diff --git a/CHANGES.md b/CHANGES.md index 72308ae3..f4aaf897 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,7 @@ - FIX: Add missing `pystac[validation]` in setup.py - FIX: Handle RCM and RS2 products that doesn't bundle their extent in a KML file ([#155](https://github.com/sertit/eoreader/issues/155)) - FIX: Fix error in looking for bands in Sentinel-2 L1C archived products ([#168](https://github.com/sertit/eoreader/issues/168)) +- FIX: Handle wrongly recognized Planet products because of the recursive nested mtd in the Reader ([#169](https://github.com/sertit/eoreader/issues/169)) - OPTIM: Search correctly nested metadata in the Reader (without accidentally using a recursive glob) - CI: Fix S3 endpoint management with `sertit>=1.37` diff --git a/eoreader/products/optical/pla_product.py b/eoreader/products/optical/pla_product.py index 5d5927d4..4112b81e 100644 --- a/eoreader/products/optical/pla_product.py +++ b/eoreader/products/optical/pla_product.py @@ -472,6 +472,9 @@ def _get_stack_path(self, as_list: bool = False) -> Union[str, list]: "Analytic", "tif", invalid_lookahead="udm", as_list=as_list ) + if len(stack_path) < 1: + raise InvalidProductError("This is not a Planet Product.") + return stack_path def _to_reflectance(