Python fetch series behind corporate proxy

Hello, I am trying to retrieve data behind a corporate proxy. I read on the docs that Python dbnomics uses requests so I tried the following:

proxies = {“http”: “http://user:pass@ip:port”,
“https”: “https://user:pass@ip:port”}

s = requests.Session()
s.verify = False


But I am getting the next error:

SSLError: HTTPSConnectionPool(host=‘’, port=443): Max retries exceeded with url: /v22/series?observations=1&series_ids=AMECO/ZUTN/EA19. (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)’)))

Thank you in advance,


Hi Javier,

The thing is, I think, you create a requests Session instance with your proxy params, but it is not used by the dbnomics package.

According to requests documentation, you can define a global proxy configuration using environment variables:

export HTTP_PROXY="http://user:pass@ip:port"
export HTTPS_PROXY="https://user:pass@ip:port"

Then in, requests will see the proxy already configured for its default session.

1 Like