Problems with urllib

Joonas Paalasmaa joonas.paalasmaa at nokia.com
Mon Jun 18 04:37:06 EDT 2001


I get the following error message when trying to open a website with
urllib.
Internet connections are ok and I can access the page with browser.
Platform is WinNT4.

>>> indexfile = urllib.urlopen("http://www.python.org").readlines()
Traceback (most recent call last):
  File "<pyshell#7>", line 1, in ?
    indexfile = urllib.urlopen("http://www.python.org").readlines()
  File "c:\python21\lib\urllib.py", line 71, in urlopen
    return _urlopener.open(url)
  File "c:\python21\lib\urllib.py", line 176, in open
    return getattr(self, name)(url)
  File "c:\python21\lib\urllib.py", line 283, in open_http
    h.putrequest('GET', selector)
  File "c:\python21\lib\httplib.py", line 432, in putrequest
    self.send(str)
  File "c:\python21\lib\httplib.py", line 374, in send
    self.connect()
  File "c:\python21\lib\httplib.py", line 358, in connect
    self.sock.connect((self.host, self.port))
  File "<string>", line 1, in connect
IOError: [Errno socket error] (10060, 'Operation timed out')



More information about the Python-list mailing list