-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ek.data.from_source, No longer supports the CDS since the update to the split infrastructure CDS. #499
Comments
@enyfeo, please can you me an example that shows how you want to access the CDS? What Not sure about the comment related to changed format for the User Key. earthkit-data normally does not have anything to do with it since the credentials are loaded by |
I think they are referring to the scenario where the user has neither the environment variables set nor a credentials file. In this case, earth kit provides a prompt to provide the URL and the key. However, the regex fails as the key format is now different. Coincidentally, the api how-to page url has also changed from https://cds.climate.copernicus.eu/api-how-to to https://cds.climate.copernicus.eu/how-to-api so that should also be updated in the prompt text. See below error:
|
@spmvoss, thank you for the explanation. This will be fixed. In the meantime you can still turn off the |
See #504 The |
Hi Sandor,
Apologies, I have managed to get it to work now.
I received errors regarding my key being in the wrong format despite the
same key working in the cdsapi.
It is all working now.
Thanks!
…On Fri, 1 Nov 2024 at 05:48, Sander ***@***.***> wrote:
Not sure about the comment related to changed format for the User Key.
earthkit-data normally does not have anything to do with it since the
credentials are loaded by cdsapi that performs the retrieval under the
hood.
I think they are referring to the scenario where the user has neither the
environment variables set nor a credentials file. In this case, earth kit
provides a prompt to provide the URL and the key. However, the regex fails
as the key format is now different. This
<https://confluence.ecmwf.int/display/CKB/Please+read%3A+CDS+and+ADS+migrating+to+new+infrastructure%3A+Common+Data+Store+%28CDS%29+Engine>
is the related announcement.
See below error:
An API key is needed to access this dataset. Please visit
https://cds.climate.copernicus.eu/ to register or sign-in
then visit https://cds.climate.copernicus.eu/api-how-to to retrieve you
API key.
You can store the credentials in ~/.cdsapirc or in the file
pointed by the CDSAPI_RC environment variable. If you follow
the instructions below ~/.cdsapirc will be automatically created
for you.
Alternatively, you can use the CDSAPI_URL and CDSAPI_KEY environment
variables to specify the credentials.
API url: https://cds.climate.copernicus.eu/api
API key:
Traceback (most recent call last):
File "./ccri/era5.py", line 10, in
ds = earthkit.data.from_source("cds",
File ".venv/lib/python3.10/site-packages/earthkit/data/sources/*init*.py",
line 150, in from_source
src = get_source(name, *args, **kwargs)
File ".venv/lib/python3.10/site-packages/earthkit/data/sources/*init*.py",
line 131, in *call*
source = klass(*args, **kwargs)
File ".venv/lib/python3.10/site-packages/earthkit/data/core/*init*.py",
line 22, in *call*
obj.*init*(*args, **kwargs)
File ".venv/lib/python3.10/site-packages/earthkit/data/sources/cds.py",
line 121, in *init*
self.client() # Trigger password prompt before threading
File ".venv/lib/python3.10/site-packages/earthkit/data/sources/cds.py",
line 173, in client
return client(self.prompt)
File ".venv/lib/python3.10/site-packages/earthkit/data/sources/cds.py",
line 80, in client
prompt.check()
File ".venv/lib/python3.10/site-packages/earthkit/data/sources/prompt.py",
line 174, in check
self.ask_user_and_save()
File ".venv/lib/python3.10/site-packages/earthkit/data/sources/prompt.py",
line 191, in ask_user_and_save
input = self.ask_user()
File ".venv/lib/python3.10/site-packages/earthkit/data/sources/prompt.py",
line 188, in ask_user
return self.validate(prompt.ask_user())
File ".venv/lib/python3.10/site-packages/earthkit/data/sources/prompt.py",
line 108, in ask_user
value = validate(value)
File ".venv/lib/python3.10/site-packages/earthkit/data/sources/prompt.py",
line 66, in *call*
assert re.fullmatch(self.pattern, value), (self.pattern, value)
AssertionError: ('\d+:[\-0-9a-f]+', 'my-redacted-api-key')
—
Reply to this email directly, view it on GitHub
<#499 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGW3QPWJPJUWHLS647JONL3Z6MI4JAVCNFSM6AAAAABQX2YJM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJRGMZTKNBUGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi Chris, |
Is your feature request related to a problem? Please describe.
Since the update to the CDS, the CDS is no longer available as a source in the from_source function.
Additionally the EWDS, ECDS and the ADS will need to be supported.
The key has changed format for the User Key for the CDS User so this needs to be taken into account.
Describe the solution you'd like
add EWDS and other CDS Infrastructures to the possible list of from_source.
Describe alternatives you've considered
Using the cdsapi
Additional context
No response
Organisation
ECMWF
The text was updated successfully, but these errors were encountered: