CS-SI / eodag

Earth Observation Data Access Gateway
https://eodag.readthedocs.io
Apache License 2.0
316 stars 43 forks source link

Download issue #27

Closed sbrunato closed 6 years ago

sbrunato commented 6 years ago

Original report by orhygine (Bitbucket: orhygine, GitHub: orhygine).


#!python

[2018-06-07 04:43:40,761] INFO - product:download:99 : downloading product
Downloading products
[2018-06-07 04:43:42,850] DEBUG - core:__get_downloaders:207 : Looking for the appropriate Download instance to use for product: EOProduct(id=a3d0fb48-82be-5b0b-8ccb-5ad483aa2f8a, producer=peps)
[2018-06-07 04:43:42,851] DEBUG - instances_manager:__get_instances:96 : Creating configured *DOWNLOAD* plugin instances
[2018-06-07 04:43:42,851] DEBUG - instances_manager:__get_instances:103 : Creating 'DOWNLOAD' plugin instance with name 'peps'
[2018-06-07 04:43:42,851] DEBUG - instances_manager:instantiate_plugin_by_config:130 : Creating 'DOWNLOAD' plugin instance with config '{'base_uri': u'https://peps.cnes.fr/resto', u'extract': None, 'dl_url_params': {'issuerId': u'peps'}, 'plugin': u'HTTPDownload'}'
[2018-06-07 04:43:42,851] DEBUG - http:__init__:34 : Images will be downloaded to directory /tmp
[2018-06-07 04:43:42,851] DEBUG - instances_manager:__get_instances:96 : Creating configured *API* plugin instances
[2018-06-07 04:43:42,851] DEBUG - instances_manager:__get_instances:114 : Skipping 'API' plugin creation for instance 'peps': not an instance of 'API'
[2018-06-07 04:43:42,852] DEBUG - core:__get_downloaders:220 : Found 1 Download instance(s) for product EOProduct(id=a3d0fb48-82be-5b0b-8ccb-5ad483aa2f8a, producer=peps) (ordered by highest priority): [HTTPDownload(instance_name=peps, priority=0, topic=Download)]
[2018-06-07 04:43:42,852] DEBUG - core:__download:143 : Using interface for download : HTTPDownload on instance *peps*
[2018-06-07 04:43:42,852] DEBUG - core:__get_authenticator:174 : Authentication initialisation for instance peps
[2018-06-07 04:43:42,852] DEBUG - instances_manager:instantiate_plugin_by_config:130 : Creating 'AUTH' plugin instance with config '{'auth_uri': u'https://peps.cnes.fr/resto/api/users/connect', 'credentials': {'password': None, 'email': None}, 'plugin': u'GenericAuth'}'
[2018-06-07 04:43:42,852] DEBUG - core:__get_authenticator:183 : Initialized GenericAuth(instance_name=peps, priority=0, topic=Authentication) Authentication plugin for instance 'peps'
[2018-06-07 04:43:42,852] DEBUG - http:download:43 : Download url: https://peps.cnes.fr/resto/collections/S1/a3d0fb48-82be-5b0b-8ccb-5ad483aa2f8a/download
[2018-06-07 04:43:42,853] ERROR - product:main:215 : [Errno 17] File exists: '/tmp/.downloaded'
Traceback (most recent call last):
  File "/home/00154_7f48a9e7e/wps-jobs/product.py", line 198, in main
    process_cfg['params']['inputFile'] = download(input_dir)
  File "/home/00154_7f48a9e7e/wps-jobs/product.py", line 103, in download
    product_path = next(eodag_api.download_all(product))
  File "/home/00154_7f48a9e7e/anaconda2/envs/wps/lib/python2.7/site-packages/eodag/api/core.py", line 119, in download_all
    for path in self.__download(product):
  File "/home/00154_7f48a9e7e/anaconda2/envs/wps/lib/python2.7/site-packages/eodag/api/core.py", line 152, in __download
    for local_filename in maybe_generator(iface.download(product, auth=auth)):
  File "/home/00154_7f48a9e7e/anaconda2/envs/wps/lib/python2.7/site-packages/eodag/utils/__init__.py", line 87, in maybe_generator
    for elt in obj:
  File "/home/00154_7f48a9e7e/anaconda2/envs/wps/lib/python2.7/site-packages/eodag/plugins/download/http.py", line 49, in download
    os.makedirs(download_records)
  File "/home/00154_7f48a9e7e/anaconda2/envs/wps/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '/tmp/.downloaded'
sbrunato commented 6 years ago

Original comment by Oyono (Bitbucket: aoyono, GitHub: aoyono).


avoid failing download if unable to create record directory

Fix #27

→ <<cset 11929100bb6e>>

sbrunato commented 6 years ago

Original comment by Oyono (Bitbucket: aoyono, GitHub: aoyono).


avoid failing download if unable to create record directory

Fix #27

→ <<cset 32baa84b4842>>

sbrunato commented 6 years ago

Original changes by Oyono (Bitbucket: aoyono, GitHub: aoyono).


changed state from "new" to "resolved"