-
Notifications
You must be signed in to change notification settings - Fork 61
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
Possible issue in client selection #112
Comments
+1 |
I arrived at the same conclusion after some inexplicable errors and subsequent debugging. Only the old CDS/ADS keys contain a class Client(object):
logger = logging.getLogger("cdsapi")
def __new__(cls, url=None, key=None, *args, **kwargs):
_, token, _ = get_url_key_verify(url, key, None)
if ":" in token:
return super().__new__(cls)
import cads_api_client.legacy_api_client
return super().__new__(cads_api_client.legacy_api_client.LegacyApiClient) Since ECMWF is disabling the old API next week, I think it's really rather important that this gets fixed? Or am I missing something? Basically, '+1' is what I'm saying here... |
+1 |
Possibly related to #131 ? |
The key for the now legacy CDS API takes the form
{uid}:{api-key}
. The new Beta CDS API no longer contains the{uid}:
prefix. This new convention is reaffirmed here.Is the client selection logic in
Client.__new__
right? If I'm reading it correctly, the new client is chosen if":"
appears in the token, otherwise the legacy client is chosen. Should this be reversed?The text was updated successfully, but these errors were encountered: