Show Sidebar Hide Sidebar

Requests Behind Corporate Proxies in Python

How to configure Plotly's Python API to work with corporate proxies

Using Plotly's Python API Behind a Corporate Proxy

If you are behind a corporate firewall, you may see the error message:

requests.exceptions.ConnectionError: ('Connection aborted.', TimeoutError(10060, ...)

Plotly uses the requests module to communicate with the Plotly server. You can configure proxies by setting the environment variables HTTP_PROXY and HTTPS_PROXY.

$ export HTTP_PROXY=""
$ export HTTPS_PROXY=""

To use HTTP Basic Auth with your proxy, use the http://user:password@host/ syntax:

$ export HTTP_PROXY="http://user:pass@"

Note that proxy URLs must include the scheme.

You may also see this error if your proxy variable is set but you are no longer behind the corporate proxy. Check if a proxy variable is set with:

$ echo $HTTP_PROXY

Still not working?

Still need help?
Contact Us

For guaranteed 24 hour response turnarounds, upgrade to a Developer Support Plan.