Here is my Python code:
import requests requests.get('https://google.com')
This is the error:
requests.exceptions.SSLError: HTTPSConnectionPool(host='google.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)'),))
Using Insomnia gives me an error related with certificates:
My OS is Windows 7 Professional.
An SSL certificate error occurs when a web browser can't verify the SSL certificate installed on a site. Rather than connect users to your website, the browser will display an error message, warning users that the site may be insecure.
If you run into an SSL connection error in Google Chrome, there are several quick fixes that you can implement. First off, make sure you're running the latest version of Chrome. You can update Chrome from within the browser itself, or you can download and install the most recent version from Google Chrome's website.
Requests verifies SSL certificates for HTTPS requests, just like a web browser. SSL Certificates are small data files that digitally bind a cryptographic key to an organization's details. Often, a website with a SSL certificate is termed as secure website.
requests.get('https://google.com', verify='/path/to/certfile')
or you can skip verifications by doing this:
requests.get('https://google.com', verify=False)
You should specify your CA.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With