ESA-VirES / VirES-Python-Client

viresclient is a Python package for easy access to Swarm & Aeolus products as xarray.Dataset
https://viresclient.readthedocs.io
MIT License
14 stars 1 forks source link

SSL certificate error with vscode #78

Closed reddy-sachin closed 2 years ago

reddy-sachin commented 2 years ago

In vscode (mac) request = SwarmRequest() returns SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)

I've tried disabling the Proxy Strict SSL tab (bad practice), but this doesn't sort it either. I set the access token before the line above, so I presume its not this.

Is this a vscode issue or? Everything works fine within the VRE

pacesm commented 2 years ago

The error says that the openssl library is not able to verify the server SSL certificate and it prevents secure connection to the VirES server. It seems like the version of the openssl does not recognize the Let's encrypt certification authority. It could be related to the recent expiration of the Let's encrypt root certificate.

I'd recommend to upgrade your software. My guess is that vscode bundles own version of the openssl library and I'd therefore start with vscode first.

Note that issue has nothing to do with your access token or the functionality of the VirES client.

reddy-sachin commented 2 years ago

Thanks for your advise. Can't find a workaround, so i'll stick with the online VirES client.

smithara commented 2 years ago

@SAR-UCL Thank you for reporting back and sorry it hasn't worked out for you yet. Another direction you might like to try is using Docker containers, which VSCode has good tooling for. That allows you to keep the execution environment separate from your OS (installing within an isolated Linux stack), and should give a wider compatibility with scientific software as an added benefit. Drop me a message at ashley.smith@ed.ac.uk if you want to pursue this and I'll look into writing some instructions to set that up (though I don't have access to a Mac to test it exactly)