Open alunacob opened 3 years ago
Hello @alunacob , can you please post:
eodag version
)creodias
part of /tmp/creodias.conf
(without credentials)Have you tried to change the destination directory, outputs_prefix
in /tmp/creodias.conf
, to /tmp
or $HOME
?
Thank you.
Thanks for commenting:
creodias:
auth:
credentials:
password: *************
username: *****************
download:
extract: false
outputs_prefix: /mnt/cache
priority: 5
search: {}
I write the outputs into a mounted volume. I could change this for testing purposes, but in fact it's quite important to store the outputs there to be able to persist them in case of e.g. shutting down the docker container.
Thank you!
It seems when arriving here: https://github.com/CS-SI/eodag/blob/develop/eodag/plugins/download/http.py#L220
the file is not a valid zip and hence, it gets renamed. Which is a proper behavior because the download is incomplete!
However, the issue then is that the stream download exits the { get chunk -> write to file} iterator somehow before finishing the download (https://github.com/CS-SI/eodag/blob/develop/eodag/plugins/download/http.py#L210).
I have no clue why, though. I've seen requests package version is 2.25.1 which is the latest.
Any hint on what to try/check would be really appreciated.
thanks in advance.
@alunacob , thanks for the details. I'll make some tests with v1.5.2
+ creodias and see if I also get issues
@alunacob, I could not reproduce the issues with v1.5.2
+ creodias. It might be related to the mounted volume in your k8s environment.
Can you try to change outputs_prefix
to /tmp
or $HOME
?
You can change it temporarily from your python code with:
import os
from eodag import EODataAccessGateway
os.environ["EODAG__CREODIAS__DOWNLOAD__OUTPUTS_PREFIX"] = "/tmp"
dag = EODataAccessGateway()
Thanks, I will update it and report the outcome
I have tried your suggestion and the same issue happens. Also, I tried with a fresh installation with the latest eodag version (eodag (Earth Observation Data Access Gateway): version 2.3.1) through CLI, and the download seems to finish successfully, but the downloaded product is .SAFE (not .zip) and incomplete
the download seems to finish successfully, but the downloaded product is .SAFE (not .zip) and incomplete
This means that the result is incomplete or corrupted:
zipfile.is_zipfile(downloaded_path)
must be False
, and you must have got the following warning:
Downloaded product is not a Zip File. Please check its file type before using it
I do not understand what could cause the download to be incomplete. We are using streamed download through requests
, which should prevent it.
Did you try to download from another provider ?
Also is it possible to share your Dockerfile ? Or just a part of it, enough to help reproducing the issue.
Thank you
I had the same issue on some random products when downloading all T32TLT L2A tiles yesterday. A vast majority are working, but some don't, really weird. Maybe it's aproblem on creodias side ?
I redownloaded these tiles through AWS and it is working fine.
@remi-braun if you have some products ids for which you have issues, can you please post them to help us reproduce the error ? Thanks
Here they are 😄
S2A_MSIL2A_20210509T103021_N0300_R108_T32TLT_20210509T133016.SAFE
S2A_MSIL2A_20210618T103021_N0300_R108_T32TLT_20210618T133547.SAFE
S2A_MSIL2A_20210728T103031_N0301_R108_T32TLT_20210728T152601.SAFE
S2A_MSIL2A_20210906T103021_N0301_R108_T32TLT_20210906T151711.SAFE
S2A_MSIL2A_20211016T103031_N0301_R108_T32TLT_20211016T133750.SAFE
S2A_MSIL2A_20211125T103351_N0301_R108_T32TLT_20211125T133031.SAFE
S2B_MSIL2A_20220109T103319_N0301_R108_T32TLT_20220109T121931.SAFE
S2A_MSIL2A_20191226T103431_N0213_R108_T32TLT_20191226T120024.SAFE
S2A_MSIL2A_20190808T103031_N0213_R108_T32TLT_20190808T140801.SAFE
S2A_MSIL2A_20190828T103021_N0213_R108_T32TLT_20190828T164154.SAFE
S2A_MSIL2A_20190917T103021_N0213_R108_T32TLT_20190917T141750.SAFE
S2A_MSIL2A_20191007T103021_N0213_R108_T32TLT_20191007T131042.SAFE
S2A_MSIL2A_20191027T103131_N0213_R108_T32TLT_20191027T120218.SAFE
S2A_MSIL2A_20191116T103311_N0213_R108_T32TLT_20191116T115132.SAFE
S2A_MSIL2A_20191206T103421_N0213_R108_T32TLT_20191206T121006.SAFE
Describe the bug When using eodag + creodias provider, the search works, but the download fails inconsistently (at different % of completition for the same file). When finishing (extract: false set in the config), the filename is changed from .SAFE.zip to .SAFE and the product is incomplete and not usable.
Code To Reproduce
Output 1st try:
2nd try:
Environment:
python 3.8.10
Additional context Add any other context about the bug here.