-
Notifications
You must be signed in to change notification settings - Fork 43
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
Search function will not return a SearchResult #503
Comments
Hello @iliion , in your example, the error is not displayed, so I do not know what can raise the error.... However, I can suggest you to:
product_id = "S2B_MSIL1C_20170717T153909_N0205_R011_T19TCJ_20170717T154916"
try:
search_result, total_count = dag.search(id=product_id)
except Exception as err:
print(f"Failed to collect '{product_id}' product.", err)
print(search_result)
2022-09-14 17:38:24,996 eodag.core [INFO ] (core ) Searching product with id 'S2B_MSIL1C_20170717T153909_N0205_R011_T19TCJ_20170717T154916' on provider: onda
2022-09-14 17:38:25,005 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-14 17:38:26,002 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-14 17:38:26,476 eodag.plugins.search.qssearch [DEBUG ] (qssearch ) Adapting 1 plugin results to eodag product representation
2022-09-14 17:38:26,587 eodag.core [INFO ] (core ) Found 1 result(s) on provider 'onda'
[EOProduct(id=S2B_MSIL1C_20170717T153909_N0205_R011_T19TCJ_20170717T154916, provider=onda)] I also removed type annotation as it is not supported for tuple unpacking |
Hello @sbrunato I copied your code and I get the same result as before. (It is also true that no error is raised. It just fails to collect the Product.) For the record I already have another function implemented like this: The latter is successfull |
can you try this please ? import traceback
product_id = "S2B_MSIL1C_20170717T153909_N0205_R011_T19TCJ_20170717T154916"
try:
search_result, total_count = dag.search(id=product_id)
print(search_result)
except Exception:
print(traceback.format_exc()) Then post the output. Thanks |
I get this error
|
Ok that solved it. Thaks for your support. |
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 isS2B_MSIL1C_20170717T153909_N0205_R011_T19TCJ_20170717T154916
)I have written the following simple code in order to achieve the above.
Code
The search function finds 1 result(s) on provider 'onda' but it doesnt return an SearchResult successfully.
Output
Environment:
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
The text was updated successfully, but these errors were encountered: