Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to fetch product types with geodes_s3 #1517

Open
anesson-cs opened this issue Feb 11, 2025 · 1 comment
Open

Fail to fetch product types with geodes_s3 #1517

anesson-cs opened this issue Feb 11, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@anesson-cs
Copy link
Collaborator

Describe the bug
result_type, the required key in provider discover_product_types configuration, is missing when we try to fetch product types with geodes_s3.

Code To Reproduce
First, add mock or real credentials to geodes_s3 configuration in eodag.yml. Then run the following code:

from eodag import EODataAccessGateway
from eodag.utils.logging import setup_logging

setup_logging(verbose=3)
dag = EODataAccessGateway()

extended_catalog = dag.list_product_types()

Output
2025-02-11 15:39:43,718 eodag.config [DEBUG ] Loading configuration from /home/anesson/workspace/EODAG/dev/eodag/eodag/resources/providers.yml
2025-02-11 15:39:44,387 eodag.config [INFO ] Loading user configuration from: /home/anesson/.config/eodag/eodag.yml
2025-02-11 15:39:44,415 eodag.core [DEBUG ] Opening product types index in /home/anesson/.config/eodag/.index
2025-02-11 15:39:44,422 eodag.core [DEBUG ] Out-of-date product types index removed from /home/anesson/.config/eodag/.index
2025-02-11 15:39:44,423 eodag.core [DEBUG ] Creating product types index in /home/anesson/.config/eodag/.index
2025-02-11 15:39:44,933 eodag.core [INFO ] Locations configuration loaded from /home/anesson/.config/eodag/locations.yml
2025-02-11 15:39:44,933 eodag.config [INFO ] Fetching external product types from https://cs-si.github.io/eodag/eodag/resources/ext_product_types.json
2025-02-11 15:39:46,010 eodag.core [DEBUG ] Added 302 product types for cop_marine
2025-02-11 15:39:46,023 eodag.core [DEBUG ] Added 3 product types for earth_search
2025-02-11 15:39:46,243 eodag.core [DEBUG ] Added 63 product types for eumetsat_ds
2025-02-11 15:39:46,585 eodag.core [DEBUG ] Added 107 product types for geodes
2025-02-11 15:39:47,054 eodag.core [DEBUG ] Added 118 product types for planetary_computer
2025-02-11 15:39:47,087 eodag.core [DEBUG ] Added 7 product types for usgs_satapi_aws
2025-02-11 15:39:51,154 eodag.core [DEBUG ] Added 744 product types for wekeo_cmems
2025-02-11 15:39:51,157 eodag.core [DEBUG ] Out-of-date product types index removed from /home/anesson/.config/eodag/.index
2025-02-11 15:39:51,157 eodag.core [DEBUG ] Creating product types index in /home/anesson/.config/eodag/.index
2025-02-11 15:39:53,897 eodag.config [DEBUG ] Loading configuration from /home/anesson/workspace/EODAG/dev/eodag/eodag/resources/providers.yml
2025-02-11 15:39:54,018 eodag.search.qssearch [INFO ] Fetching product types: https://hydroweb.next.theia-land.fr/api/v1/rs-catalog/stac/search/../collections
2025-02-11 15:39:56,895 eodag.core [DEBUG ] Added 30 product types for hydroweb_next
2025-02-11 15:39:56,898 eodag.core [DEBUG ] Out-of-date product types index removed from /home/anesson/.config/eodag/.index
2025-02-11 15:39:56,898 eodag.core [DEBUG ] Creating product types index in /home/anesson/.config/eodag/.index
2025-02-11 15:39:59,932 eodag.auth.token_exchange [DEBUG ] Getting subject auth token
2025-02-11 15:39:59,933 eodag.auth.openid_connect [DEBUG ] access_token expired or not available yet, new token request
2025-02-11 15:39:59,933 eodag.auth.openid_connect [DEBUG ] Fetching access token from https://auth.destine.eu/realms/desp/protocol/openid-connect/token
2025-02-11 15:40:00,959 eodag.auth.token_exchange [DEBUG ] Getting target auth token
2025-02-11 15:40:01,325 eodag.search.qssearch [INFO ] Fetching product types: https://hda.data.destination-earth.eu/stac/collections
2025-02-11 15:40:01,326 eodag.auth.openid_connect [DEBUG ] PreparedRequest: {'method': 'GET', 'url': 'https://hda.data.destination-earth.eu/stac/collections', 'headers': {'User-Agent': 'eodag/3.1.0b2.dev32+gabec9a1d.d20250210', 'Accept-Encoding': 'gzip, deflate', 'Accept': '/', 'Connection': 'keep-alive', 'Authorization': 'Bearer ***'}, '_cookies': <RequestsCookieJar[]>, 'body': None, 'hooks': {'response': []}, '_body_position': None}
2025-02-11 15:40:02,176 eodag.core [DEBUG ] Added 2 product types for dedl
2025-02-11 15:40:02,179 eodag.core [DEBUG ] Out-of-date product types index removed from /home/anesson/.config/eodag/.index
2025-02-11 15:40:02,179 eodag.core [DEBUG ] Creating product types index in /home/anesson/.config/eodag/.index
Traceback (most recent call last):
File "/home/anesson/workspace/EODAG/dev/eodag/docs/notebooks/api_user_guide/yyyymmdd_XXX_issue.py", line 142, in
extended_catalog = dag.list_product_types()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anesson/workspace/EODAG/dev/eodag/eodag/api/core.py", line 589, in list_product_types
self.fetch_product_types_list(provider=provider)
File "/home/anesson/workspace/EODAG/dev/eodag/eodag/api/core.py", line 710, in fetch_product_types_list
if default_discovery_conf["result_type"] == "json" and isinstance(
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'result_type'

Environment:

  • Python version: 3.12.3
  • EODAG version: 3.1.0b2.dev32+gabec9a1d.d20250210
@anesson-cs anesson-cs added the bug Something isn't working label Feb 11, 2025
@gch-meoss
Copy link

gch-meoss commented Mar 5, 2025

Hello,

I also have an issue with geodes and eodag.yml

the geodes_s3 provider is missing in eodag.yml but there is two geodes provides in the yaml file.

(eodag version used 3.1.0b2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants