This error appears to be coming from OpenSSL. You may have some kind of configuration in your environment that forces Requests to set the location of the certificate to something that does not contain the required certificate.
Try exploring possible ways to verify certificate requests:
- It searches for a configuration using the
REQUESTS_CA_BUNDLE environment variable. - It verifies curl compliance using the
CURL_CA_BUNDLE environment CURL_CA_BUNDLE . - It tries to import the certifi list if the
certifi package can be imported.
Check if one of REQUESTS_CA_BUNDLE or CURL_CA_BUNDLE is in your environment:
env | egrep "REQUESTS_CA_BUNDLE|CURL_CA_BUNDLE"
If one of them is installed, requests are likely to use this configuration when verifying certificates. If not, then the requests probably use certifi . In this case, it might be worth updating it:
pip install -U certifi
Otherwise, try passing verify=False to requests.get so that it skips the verification step. I would recommend solving the real problem, and not just turning it off, but it can help you figure it out.
Stephen Emslie Jan 27 '12 at 10:11 2012-01-27 10:11
source share