# Python Proxy Connection Error

**URL:** <https://community.plotly.com/t/python-proxy-connection-error/12052>\
**Category:** 📊 Plotly Python\
**Created:** [July 24, 2018, 4:12pm UTC](https://community.plotly.com/t/python-proxy-connection-error/12052 "2018-07-24T16:12:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![paragon](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@paragon](https://community.plotly.com/u/paragon)\
**Post date:** [July 24, 2018, 4:12pm UTC](https://community.plotly.com/t/python-proxy-connection-error/12052/1 "2018-07-24T16:12:41Z")

</div>

I am working on Python 3.7 (PyCharm) behind a company authenticated proxy. I have searched for a solution to my error codes, but I have not found much. I have set up HTTP\_PROXY and HTTPS\_PROXY environment variables and changed my Internet Option/LAN settings.

**Error Codes:**

_TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond_

_During handling of the above exception, another exception occurred: urllib3.exceptions.NewConnectionError: \<urllib3.connection.VerifiedHTTPSConnection object at 0x000000114C52C860\>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond_

_urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘plot.ly’, port=443): Max retries exceeded with url: /clientresp (Caused by NewConnectionError(’\<urllib3.connection.VerifiedHTTPSConnection object at 0x000000114C52C860\>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond’))_

_requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘plot.ly’, port=443): Max retries exceeded with url: /clientresp (Caused by NewConnectionError(’\<urllib3.connection.VerifiedHTTPSConnection object at 0x000000114C52C860\>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond’))_

_plotly.exceptions.PlotlyRequestError: No message._

**I am implementing using:**

_import urllib3_  
_import certifi_  
_from urllib3 import ProxyManager, make\_headers_  
_default\_headers = urllib3.make\_headers(proxy\_basic\_auth = ‘username:password’)_  
_http = urllib3.ProxyManager(‘proxy/’,_  
\_ headers = default\_headers)\_

_r = http.request(‘GET’, ‘[http://plot.ly](http://plot.ly)’)_

_import plotly.plotly as py_  
_import plotly.graph\_objs as go_  
_import plotly_  
_plotly.tools.set\_credentials\_file(username=‘plotlyusername’, api\_key=‘apikey’)_  
_plotly.tools.set\_config\_file(world\_readable = False, sharing = ‘private’)_

_trace0 = go.Scatter(_  
\_ x=[1, 2, 3, 4],\_  
\_ y=[10, 15, 13, 17]\_  
_)_  
_trace1 = go.Scatter(_  
\_ x=[1, 2, 3, 4],\_  
\_ y=[16, 5, 11, 9]\_  
_)_  
_data = [trace0, trace1]_

_py.plot(data, filename = ‘basic-line’, auto\_open=True)_
