urllib problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • C GIllespie

    urllib problem

    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.ur lopen('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_outp ut()
    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')


Working...