简体   繁体   中英

URLError: <urlopen error [Errno 110] Connection timed out> Proxy Error

I am attemping to use Matplotlib and arcgisimage to download and plot an image using the arcgis REST API service. A snippet error I'm running into is below. I suspect I can't connect to this arcgis server, because I'm being blocked by the firewall at my organization. Typically when I want to download something, say using pip, I have to enter a proxy, ie proxy.**.gov:8080. How would I go about getting around this firewall? I've tested my code at home without a firewall, and the arcgisimage works fine, which is why I suspect it's a firewall issue. Thanks.

/opt/antelope/python2.7.8/lib/python2.7/urllib2.pyc in do_open(self, http_class, req)
   1182         except socket.error, err: # XXX what error?
   1183             h.close()
-> 1184             raise URLError(err)
   1185         else:
   1186             try:

URLError: <urlopen error [Errno 110] Connection timed out>

I did the following, and this should work:

$ export http_proxy='http://myproxy.example.com:1234'
$ python myscript.py  # Using http://myproxy.example.com:1234 as a proxy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM