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

Error writing search results to GeoJson using eodag-sentinelsat provider #4

Closed
ahuarte47 opened this issue Apr 14, 2021 · 2 comments · Fixed by #13
Closed

Error writing search results to GeoJson using eodag-sentinelsat provider #4

ahuarte47 opened this issue Apr 14, 2021 · 2 comments · Fixed by #13
Assignees
Labels
bug Something isn't working
Projects

Comments

@ahuarte47
Copy link

Serialization of search results does not take care of Date/Datetime objects in metadata of Products fetched.
It might be an edge case but it might be interesting to fix it.

Error
TypeError: Object of type datetime is not JSON serializable

Install sentinelsat plugin

python -m pip install eodag
python -m pip install eodag-sentinelsat

Configure 'scihub' provider with highest priority.

Code To Reproduce
CLI command:

eodag -vvv search --conf "eodag-user_conf.yml" --box .... --all --storage "my_search.geojson"

Output
image

Environment:

  • Python version: 3.7.4 on Windows 10
  • EODAG version: 2.2.0

Additional context:
Using CS-SI/eodag#235 to configure the settings of this provider in an user configuration file.
image

Fix in my own code:
image

@sbrunato
Copy link
Collaborator

Thanks for pointing out this issue.
The problem is that eodag-sentinelsat uses datetime objects to store date metadata. We must use ISO-8601 str like for other providers instead

@sbrunato sbrunato transferred this issue from CS-SI/eodag Apr 14, 2021
@sbrunato sbrunato added this to High priority in eodag.* Apr 14, 2021
@sbrunato sbrunato added the bug Something isn't working label Apr 15, 2021
@maximlt maximlt self-assigned this Apr 21, 2021
eodag.* automation moved this from High priority to Closed Apr 23, 2021
@ahuarte47
Copy link
Author

Thank you very much to everyone!

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
No open projects
eodag.*
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants