urllib bug?
Steve Clift
sgclift at earthlink.net
Sun Sep 1 22:47:25 EDT 2002
Is this *really* a urllib bug, or am I missing something blindingly obvious?
Python 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
IDLE 0.8 -- press F1 for help
>>> import urllib
>>> f = urllib.urlopen('http://www.python.org')
Traceback (most recent call last):
File "<pyshell#4>", line 1, in ?
urllib.urlopen('http://www.python.org')
File "C:\PROGRAM FILES\PYTHON22\lib\urllib.py", line 73, in urlopen
return _urlopener.open(url)
File "C:\PROGRAM FILES\PYTHON22\lib\urllib.py", line 178, in open
return getattr(self, name)(url)
File "C:\PROGRAM FILES\PYTHON22\lib\urllib.py", line 276, in open_http
if not host: raise IOError, ('http error', 'no host given')
IOError: [Errno http error] no host given
Fails the same way with 2.1. Works OK with 1.5.2 and (IIRC) 2.0.
-Steve
More information about the Python-list
mailing list