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
(cdsapi) ᚌ username@hostname: Downloads $ python cdsapi_test.py
Traceback (most recent call last):
File "~/Downloads/cdsapi_test.py", line 3, in <module>
client = cdsapi.Client()
File "~/.conda/envs/cdsapi/lib/python3.13/site-packages/cdsapi/api.py", line 285, in __new__
import cads_api_client.legacy_api_client
File "~/.conda/envs/cdsapi/lib/python3.13/site-packages/cads_api_client/__init__.py", line 25, in <module>
from .api_client import ApiClient
File "~/.conda/envs/cdsapi/lib/python3.13/site-packages/cads_api_client/api_client.py", line 8, in <module>
import multiurl.base
File "~/.conda/envs/cdsapi/lib/python3.13/site-packages/multiurl/__init__.py", line 11, in <module>
from .downloader import Downloader, download, robust
File "~/.conda/envs/cdsapi/lib/python3.13/site-packages/multiurl/downloader.py", line 18, in <module>
from .http import FullHTTPDownloader, PartHTTPDownloader, robust
File "~/.conda/envs/cdsapi/lib/python3.13/site-packages/multiurl/http.py", line 10, in <module>
import cgi
ModuleNotFoundError: No module named 'cgi'
Install legacy-cgi (https://pypi.org/project/legacy-cgi). This resolved the error for me, and I was able to download data. Perhaps this should be treated as a new required dependency going forwards)?
(On a separate note, I also encountered an issue with now deprecated pkg_resource, and this is resolved in the suggested pull request #74. Mentioning here as both issues occur because of upgrade to python 3.13.)
Organisation
Met Office
The text was updated successfully, but these errors were encountered:
@mo-jfallon this should indeed be resolved with the PR linked to ecmwf/multiurl#14. The latest release of multiurl should therefore support python 3.13. Does this indeed resolve your issue? In that case this issue can be closed.
What maintenance does this project need?
Issue:
An error was encountered running the cdsapi test code: https://cds.climate.copernicus.eu/how-to-api
cgi
module removed from Python versions >=3.13
(see documentation: https://docs.python.org/3.11/library/cgi.html )Solution:
Install
legacy-cgi
(https://pypi.org/project/legacy-cgi). This resolved the error for me, and I was able to download data. Perhaps this should be treated as a new required dependency going forwards)?(On a separate note, I also encountered an issue with now deprecated
pkg_resource
, and this is resolved in the suggested pull request #74. Mentioning here as both issues occur because of upgrade to python 3.13.)Organisation
Met Office
The text was updated successfully, but these errors were encountered: