urllib problem

C GIllespie csgcsg39 at hotmail.com
Thu Jan 15 06:06:45 EST 2004


Dear All,

I'm having problems using the urllib module and was wondering if anyone
could suggest a solution. The only thing I can thing of is that I'm using at
university and my uni uses a compulsory proxy.

I'm using the python 2.3.3 and have tried both windows and Linux
environments. I've tried different urls as well.

Here's the code and error message I get

Thanks

Colin

import urllib
usock=urllib.urlopen('http://slashdot.org/slashdot.rdf')

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/urllib.py", line 76, in urlopen
return opener.open(url)
File "/usr/lib/python2.3/urllib.py", line 181, in open
return getattr(self, name)(url)
File "/usr/lib/python2.3/urllib.py", line 297, in open_http
h.endheaders()
File "/usr/lib/python2.3/httplib.py", line 712, in endheaders
self._send_output()
File "/usr/lib/python2.3/httplib.py", line 597, in _send_output
self.send(msg)
File "/usr/lib/python2.3/httplib.py", line 564, in send
self.connect()
File "/usr/lib/python2.3/httplib.py", line 548, in connect
raise socket.error, msg
IOError: [Errno socket error] (113, 'No route to host')





More information about the Python-list mailing list