Hi people, 

I am running this code (just a test)


import cdsapi

def main():
c = cdsapi.Client(timeout=600,quiet=False,debug=True)

c.retrieve("reanalysis-era5-pressure-levels",
{
"variable": "temperature",
"pressure_level": "1000",
"product_type": "reanalysis",
"year": "2008",
"month": "01",
"day": "01",
"time": "12:00",
"format": "grib"
}, "download.grib")

print("downloaded")

main()


and I am always receiving this error:

2021-11-28 16:35:03,709 WARNING Recovering from connection error [HTTPSConnectionPool(host='download-0001.copernicus-climate.eu', port=443): Max retries exceeded with url: /resources/reanalysis-era5-single-levels (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)')))], attemps 0 of 500


I've already done many things trying to solve it, including:

  • Upgrading certifi, pyopenSSL
  • Downloading and installing ecmwf certificates to windows
  • manually adding ECMWF certificates to certific cacert.pem
  • changing envinronment

but was never able to solve this... any ideas on how to solve it? 

4 Comments

  1. Hi Juliano Silva ,

    Apologies for the very slow response here. I believe the issue you were experiencing has been fixed, can you confirm if you are still experiencing difficulties.

    Many thanks,

    Eddy

  2. Hi Edward Comyn-Platt ,

    I am facing the exact same issue as Juliano Silva did and cannot figure out what I am doing wrong.
    Any chance you can help me ?

    Regards,

    Antoine

    1. Hi Antoine Rogeau ,

      Could you paste/attach the error message you are getting to this thread please?

      We are not currently experiencing SSL certificate issues on the CDS end so I think it may be slightly different to that reported by Juliano.

      Many thanks,

      Eddy

  3. Hi Juliano Silva ,
    Some companies have their own Certificate Authority which can say that the certificate is not valid. If you want to ignore the check of the certificate you can modify the Client, by passing verify=False parameter, like so:

    c = cdsapi.Client(timeout=600,quiet=False,debug=True,verify=False)

    Regards