Resolve DKCloudCommand SSL Errors¶
A message similar to one of the following appears in the command line to alert you:
Error: There was a problem with the SSL Certificate.
CryptographyDeprecatonWarning: This version of cryptography contains a temporary pyOpenSSL fallback path.
Details¶
When installing or upgrading DKCloudCommand, you may experience an SSL certificate error. This can happen when using Python 3.6 or when the certificates for your local Python install aren't in the expected location.
The potential causes and solutions tend to be operating system specific but can occur for either OS.
Potential causes¶
MacOS¶
The SSL certificate validation issue has been traced to a MacOS-specific change that was made in Python 3.6. For more details, you can consult their release notes.
Additional messaging that displays in the command line for this issue:
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)>
Warning
While this issue has been traced to Python 3.6, it has been known to occur in later versions of Python and in Windows OS.
Linux¶
The DataKitchen command line interface uses Python's public certificates to complete a handshake negotiation. If the certificates for your local Python install are in an unexpected location or are expired, an error can occur.
Solution¶
MacOS¶
To prevent the MacOS SSL certificate validation error, run the following command in the Terminal,
substituting the appropriate Python version. The code runs a pip command that validates and updates certificates.
Linux¶
To resolve this SSL error, run the following command. This command instructs Python requests to use the system ca-certificates bundle, rather than the embedded Python bundle.
You can verify which file certificates load with $ pip install certifi then $ python -m certifi or check the crt path with os.getenv.
Related topics¶
Note
Still not working? Contact DataKitchen Support. We can work through this together.