From 7361974b7665e6564988d16ede6281a7077a5728 Mon Sep 17 00:00:00 2001 From: Eddy Comyn-Platt <53045993+EddyCMWF@users.noreply.github.com> Date: Mon, 27 Feb 2023 11:08:31 +0000 Subject: Assertion error for cdsapi key (#60) --- cdsapi/api.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cdsapi') diff --git a/cdsapi/api.py b/cdsapi/api.py index a603716..79c2ef3 100644 --- a/cdsapi/api.py +++ b/cdsapi/api.py @@ -322,6 +322,10 @@ class Client(object): self.session = session self.session.auth = tuple(self.key.split(":", 2)) + assert len(self.session.auth)==2, ( + "The cdsapi key provided is not the correct format, please ensure it conforms to:\n" + ":" + ) self.metadata = metadata self.forget = forget -- cgit v1.2.3