Created 11-15-2021 10:03 PM
I am trying to run an example from the cloudera documentation site in python. I am getting ssl certificate error:
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)
Getting a certificate is not a solution to my problem. Can I ignore the certificate validation when accessing the api, similar to how it can be done through a regular request?
For example:
import requests
res = requests.get(url, auth=(login, pass), timeout= 1000000, verify= False)
my code:
import cm_client
cm_client.configuration.username = login
cm_client.configuration.password = pass
api_url = api_host + ':' + port + '/api/' + api_version
api_client = cm_client.ApiClient(api_url)
cluster_api_instance = cm_client.ClustersResourceApi(api_client)
Created 02-27-2024 12:01 PM
Hi @mananasaly refer below stackoverflow discussion, this may help you to bypass ssl certificate in python
Let us know if this helps
Created 04-13-2025 10:20 PM
Hello, @mananasaly, the SSL certificate error in Python you are getting can occur due to when making HTTPS requests using the requests module in Python. To solve the error, I found the reference guide from:- https://cheapsslweb.com/blog/ssl-certificate-verify-failed-error-in-python/. You can refer to it, maybe it will be helpful to solve the error.
I hope it helps!
Created 07-21-2025 01:44 AM
You can bypass SSL verification in Python using:
import requests
response = requests.get('https://your-url.com', verify=False)
However, disabling SSL verification is not recommended for production as it exposes you to security risks.
If you're facing a CERTIFICATE_VERIFY_FAILED error, it's better to fix the underlying certificate issue. Here's a detailed guide: https://sslinsights.com/fix-certificate-verify-failed-error-in-python/
Hope it helps!
Created on 07-21-2025 01:47 AM - edited 07-21-2025 01:49 AM
You can bypass SSL verification in Python using:
import requests
response = requests.get('https://your-url.com', verify=False)
However, disabling SSL verification is not recommended for production as it exposes you to security risks. If you're facing a CERTIFICATE_VERIFY_FAILED error, it's better to fix the underlying certificate issue. Here's a detailed guide: https://sslinsights.com/fix-certificate-verify-failed-error-in-python/