You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have Eodag 3.0.1 as a dependency of my project. Installed without any options: dependencies = ["eodag"].
When I instantiate the dag I sometimes get a warning for pkg_resources.UnknownExtra: eodag 3.0.1 has no such extra feature 'ecmwf'. Sometimes it warns for 'csw' and not 'ecmf'.
I override the default providers and user conf with only a single provider (geodes) to simplify debugging. So it should not even be aware of any other providers.
The EODataAccessGateway is instantiated in an async event loop and if multiple of these are instantiated at the same time it causes this error. This makes it a little tricky to debug and reproduce.
It appears as though
CSWSearch is registered as an entry point and its optional dependencies are not installed (as expected).
pkg_resources tries to load CSWSearch, fails to resolve eodag[csw], and raises UnknownExtra.
This behavior only happens sometimes because pkg_resources lazily loads entry points(?), meaning the failure occurs only when CSWSearch is actually accessed or it only happens due to some async / eodag shared object issue
Exception has occurred: UnknownExtra
eodag 3.0.1 has no such extra feature 'ecmwf'
KeyError: 'ecmwf'
The above exception was the direct cause of the following exception:
File "/usr/local/app/app/downloader.py", line 346, in _download
dag = EODataAccessGateway()
File "/usr/local/app/app/downloader.py", line 308, in download
return await asyncio.wait_for(loop.run_in_executor(None, pfunc), timeout=self.total_timeout)
File "/usr/local/lib/python3.11/site-packages/eodag/api/core.py", line 163, in __init__
self._plugins_manager = PluginManager(self.providers_config)
File "/usr/local/lib/python3.11/site-packages/eodag/plugins/manager.py", line 108, in __init__
entry_point.load()
File "/usr/local/lib/python3.11/site-packages/pkg_resources/__init__.py", line 2772, in load
self.require(*args, **kwargs) # type: ignore[arg-type]
File "/usr/local/lib/python3.11/site-packages/pkg_resources/__init__.py", line 2799, in require
reqs = self.dist.requires(self.extras)
File "/usr/local/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3105, in requires
raise UnknownExtra(f"{self} has no such extra feature {ext!r}") from e
pkg_resources.UnknownExtra: eodag 3.0.1 has no such extra feature 'csw'
OR
pkg_resources.UnknownExtra: eodag 3.0.1 has no such extra feature 'ecmwf'
When I run it in a debugger and let each concurrent dag instantiate before continuing it does not happen.
I do not expect Eodag to be async safe as I don't think the package sells itself as an async package but it would be an improvement to not get this unrelated exception upon instantiating a dag async.
The text was updated successfully, but these errors were encountered:
andretheronsa
changed the title
EODataAccessGateway init fails with: "pkg_resources.UnknownExtra: eodag 3.0.1 has no such extra feature 'ecmwf'"
EODataAccessGateway async init fails with: "pkg_resources.UnknownExtra: eodag 3.0.1 has no such extra feature 'ecmwf'"
Feb 17, 2025
Describe the bug
I have Eodag 3.0.1 as a dependency of my project. Installed without any options:
dependencies = ["eodag"]
.When I instantiate the dag I sometimes get a warning for
pkg_resources.UnknownExtra: eodag 3.0.1 has no such extra feature 'ecmwf'
. Sometimes it warns for 'csw' and not 'ecmf'.I override the default providers and user conf with only a single provider (geodes) to simplify debugging. So it should not even be aware of any other providers.
The EODataAccessGateway is instantiated in an async event loop and if multiple of these are instantiated at the same time it causes this error. This makes it a little tricky to debug and reproduce.
It appears as though
Code To Reproduce
Output
Environment:
Additional remarks
The text was updated successfully, but these errors were encountered: