API does not recognize userid nor userkey

Hi all,
I was trying to download ERA 5 daily reanalysis temperature data after updating the API, setting a new ECMWF account and updating the .cdsapirc but I was getting this error message:

AssertionError: The cdsapi key provided is not the correct format, please ensure it conforms to: :

Then, I update the .cdsapirc file as stated and I get this other error message:
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://cds.climate.copernicus.eu/api/resources/derived-era5-single-levels-daily-statistics

The two errors are replicated if I provide the URL and KEY as variables to cdsapi.Client().

Help, please,
Jon

Sounds like a potential cdsapi version issue.
Check the version of the python library.
It should be the latest one (>= v 0.7.2).

Install/update:

pip install 'cdsapi>=0.7.2'

Cheers,
K

Thanks for the reply. The version of the cdsapi is 0.7.4,
I just followed the instructions at Climate Data Store
Cheers

Solved. I had anaconda installed. I uninstalled anaconda and installed the new cdsapi and updated attrs and worked fine. The problem washaving two local environments for python 3.

1 Like