question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Search function will not return a SearchResult

See original GitHub issue

I 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:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
iliioncommented, Sep 21, 2022

Ok that solved it. Thaks for your support. Cheers! 😃

0reactions
sbrunatocommented, Sep 21, 2022

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")

Read more comments on GitHub >

github_iconTop Results From Across the Web

SharePoint Online doesn't return search results - Microsoft Learn
Under Site Collection Administration, click Search Result Sources, and then confirm that Local SharePoint Results has the check mark for Default ...
Read more >
TypeError: this.state.searchResults.map is not a function
The moment i try to enter in the search box its leading to the typeerror. I have declared the searchResults as a state....
Read more >
Excel SEARCH function not returning expected results
Yes SEARCH will return an array, but you need to do something with that array or it will only return the first result:...
Read more >
The Search function in ArcGIS Workforce does not return any ...
In ArcGIS Workforce, the Search function does not return any results when searching for an assignment ID. However, searching for the same ...
Read more >
How to fix “No results found” on Windows 10 Search?
Search function doesn't work at all. Whatever I'm trying to look for, the only search result I receive is a message “No results...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found