Problems with urllib

Aurelio Martín amartin at wpsnetwork.com
Mon Jun 18 11:08:12 EDT 2001


Joonas Paalasmaa <joonas.paalasmaa at nokia.com> escribió en el mensaje de
noticias 3B2DCC2B.B3DCDDD5 at nokia.com...
> 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')

I just tried the same sentence in my NT4 SP5 system with Python 2.1 and it
works. Maybe www.python.org was busy at the time of your request, or your
Internet connection was down for a little while.











More information about the Python-list mailing list