I encountered the following SSLCertVerificationError when trying to run the example notebook "1_Authentication" under "using-cognite-python-sdk". The authentication via interactive login was successful.
However, it threw the SSL error when executing “client.login.status()”
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)
I updated “certifi” as suggested in another discussion thread, but the error still exists. I’m using Python 3.9.12.
ANy suggestion is appreciated.
Best answer by Mithila Jayalath ExternalView original
Yes. It works after setting self.disable_ssl to True. Thanks!
@Mithila Jayalath External
I tried both (update certifi and set self.disable_ssl to True) but still get error:
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:992)
Any other ideas please?
Actually after restart of the IDE and having self.disable_ssl set to True I could connect and retrieve data. What can be the issue / solution so that ssl does not need to be disabled?
There are several possible causes for SSL errors when using the Cognite SDK. Some of the most common reasons include:
Network issues: SSL errors can also occur due to network issues, such as firewall rules or proxy configurations that are blocking or interfering with the SSL/TLS connection.
Since you have previously mentioned that you have updated the certificate, I think that the possible issue for your particular case should be the 2nd bullet point that I have mentioned above. I hope my answer is clear :)