Search function will not return a SearchResult
See original GitHub issueI have configured an eodag instance having as a provider ONDA DIAS and also the respective username and password.
The objective is to search and download a product by its ID
(The ID is S2B_MSIL1C_20170717T153909_N0205_R011_T19TCJ_20170717T154916
)
I have written the following simple code in order to achieve the above.
Code
...
try:
product: SearchResult= dag.search(id=product_id)
except Exception as err:
print(f"Failed to collect '{product_id}' product.", err)
...
The search function finds 1 result(s) on provider ‘onda’ but it doesnt return an SearchResult successfully.
Output
python core/core.py --provider onda --product_id S2B_MSIL1C_20170717T153909_N0205_R011_T19TCJ_20170717T154916
2022-09-12 19:13:05,923-15s eodag.config [INFO ] (config ) Loading user configuration from: /home/vagrant/Desktop/JRC_Repos/data-downloaders/eodag_download/eodag/core/config/eodag.yml
2022-09-12 19:13:06,356-15s eodag.core [DEBUG ] (core ) Opening product types index in /home/vagrant/.config/eodag/.index
2022-09-12 19:13:06,383-15s eodag.core [INFO ] (core ) Locations configuration loaded from /home/vagrant/Desktop/JRC_Repos/data-downloaders/eodag_download/eodag/core/config/locations.yml
2022-09-12 19:13:08,108-15s eodag.core [INFO ] (core ) Searching product with id 'S2B_MSIL1C_20170717T153909_N0205_R011_T19TCJ_20170717T154916' on provider: onda
2022-09-12 19:13:08,108-15s eodag.core [DEBUG ] (core ) Using plugin class for search: ODataV4Search
2022-09-12 19:13:08,109-15s eodag.plugins.search.qssearch [DEBUG ] (qssearch ) Getting genric provider product type definition parameters for None
2022-09-12 19:13:08,109-15s eodag.plugins.search.qssearch [DEBUG ] (qssearch ) Getting genric provider product type definition parameters for None
2022-09-12 19:13:08,110-15s eodag.plugins.search.qssearch [DEBUG ] (qssearch ) Building the query string that will be used for search
2022-09-12 19:13:08,110-15s eodag.plugins.search.qssearch [DEBUG ] (qssearch ) Retrieving queryable metadata from metadata_mapping
2022-09-12 19:13:08,111-15s eodag.plugins.search.qssearch [INFO ] (qssearch ) Sending search request: https://catalogue.onda-dias.eu/dias-catalogue/Products?$format=json&$search=%22S2B_MSIL1C_20170717T153909_N0205_R011_T19TCJ_20170717T154916%22
2022-09-12 19:13:08,819-15s eodag.plugins.search.qssearch [DEBUG ] (qssearch ) Sending metadata request: https://catalogue.onda-dias.eu/dias-catalogue/Products(de250e38-6e13-44cc-ba07-fc5411658ab7)/Metadata
2022-09-12 19:13:09,169-15s eodag.plugins.search.qssearch [DEBUG ] (qssearch ) Adapting 1 plugin results to eodag product representation
2022-09-12 19:13:09,251-15s eodag.core [INFO ] (core ) Found 1 result(s) on provider 'onda'
Failed to collect 'S2B_MSIL1C_20170717T153909_N0205_R011_T19TCJ_20170717T154916' product.
Environment:
- Python version: 3.6.9
- EODAG version: 2.5.2
Additional context
The metadata request is successfull (in the browser)
https://catalogue.onda-dias.eu/dias-catalogue/Products(de250e38-6e13-44cc-ba07-fc5411658ab7)/Metadata
As well as the request for the product:
https://catalogue.onda-dias.eu/dias-catalogue/Products?$format=json&$search=%22S2B_MSIL1C_20170717T153909_N0205_R011_T19TCJ_20170717T154916%22
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top GitHub Comments
Ok that solved it. Thaks for your support. Cheers! 😃
You’re welcome. Also, you should update eodag, as this issue has bee fixed in #380 (v2.4.0 release). Or if you cannot update, specify the product type while searching:
dag.search(id=product_id, productType="S2_MSI_L1C")