You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are in a corporate environment, you probably connect to the Internet through another computer called a 'proxy'. You will need the URL of this proxy; it might look like https://proxy.my-company.net:8080. Then use it in your Python environment like this:
proxies = {'https': 'https://proxy.my-company.net:8080'}
r = requests.get(url, proxies=proxies)
Each time you use requests.get() you will need to pass the proxies dictionary in this way.
Getting SSLCertVerificationError or similar
If you get some variant of SSLError, SSLCertVerificationError, CERTIFICATE_VERIFY_FAILED or certificate verify failed: unable to get local issuer certificate, then you need to tell requests where to find your certificates. On Linux, they are usually in /etc/ssl/certs. For example, this sort of thing might work:
verify = '/etc/ssl/certs/ca-bundle.crt'
r = requests.get(url, verify=verify)
On Windows you need to export your CA certs from your registry to a file and point requests to that.
A note about proxies
If you are in a corporate environment, you probably connect to the Internet through another computer called a 'proxy'. You will need the URL of this proxy; it might look like
https://proxy.my-company.net:8080
. Then use it in your Python environment like this:Each time you use
requests.get()
you will need to pass theproxies
dictionary in this way.Getting
SSLCertVerificationError
or similarIf you get some variant of
SSLError
,SSLCertVerificationError
,CERTIFICATE_VERIFY_FAILED
orcertificate verify failed: unable to get local issuer certificate
, then you need to tellrequests
where to find your certificates. On Linux, they are usually in/etc/ssl/certs
. For example, this sort of thing might work:On Windows you need to export your CA certs from your registry to a file and point
requests
to that.