Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions docs/getting_started_guide/configure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,6 @@ commands:

.. code-block:: python

dag.providers_config["creodias"].auth.credentials["totp"] = "PLEASE_CHANGE_ME"

# OR

dag.update_providers_config(
"""
creodias:
Expand All @@ -357,7 +353,8 @@ will be stored and used if further authentication tries fail:

.. code-block:: python

dag._plugins_manager.get_auth_plugin("creodias").authenticate()
eoproduct: eodag.EOProduct # EOProduct coming from a search result on creodias
eoproduct.downloader_auth.authenticate()

Please note that authentication mechanism is already included in
`download methods <../notebooks/api_user_guide/7_download.ipynb>`_ , so you could
Expand Down
3 changes: 3 additions & 0 deletions docs/providers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,9 @@ No credentials are needed
<getting_started_guide/configure.rst#authenticate-using-an-otp-one-time-password-two-factor-authentication>`__
to see how to proceed.

Some collections, like CopDEM ones, require additional license agreement acceptance. Check them on your
`creodias personal profile / agreements section <https://new.cloudferro.com/panel/profile/personal>`__.

----

**creodias_s3**
Expand Down
10 changes: 6 additions & 4 deletions eodag/plugins/download/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
AuthenticationError,
DownloadError,
MisconfiguredError,
NoMatchingCollection,
NotAvailableError,
TimeOutError,
)
Expand Down Expand Up @@ -672,12 +671,15 @@ def _get_unique_products(
)
)
if not unique_product_chunks and raise_error:
raise NotAvailableError(
rf"No file basename matching re.fullmatch(r'{asset_filter}') was found in {product.remote_location}"
msg = (
rf"No file basename matching re.fullmatch(r'{asset_filter}') was found in "
f"{product.remote_location}"
)
raise NotAvailableError(msg)

if not unique_product_chunks and raise_error:
raise NoMatchingCollection("No product found to download.")
msg = f"No downloadable files found for {product}."
raise NotAvailableError(msg)

return unique_product_chunks

Expand Down
1 change: 1 addition & 0 deletions eodag/resources/providers/creodias.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ creodias:
type: HTTPDownload
extract: true
order_enabled: false
auth_error_code: [401, 403]
archive_depth: 2
ssl_verify: true
auth:
Expand Down
3 changes: 1 addition & 2 deletions tests/units/test_download_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
from eodag.utils.exceptions import (
DownloadError,
MisconfiguredError,
NoMatchingCollection,
QuotaExceededError,
ValidationError,
)
Expand Down Expand Up @@ -2630,7 +2629,7 @@ def test_plugins_download_aws_no_matching_collection(
plugin.config.products[self.product.collection]["build_safe"] = False
plugin.config.flatten_top_dirs = True

with self.assertRaises(NoMatchingCollection):
with self.assertRaises(NotAvailableError):
plugin.download(self.product, outputs_prefix=self.output_dir)

@mock.patch(
Expand Down
Loading