[Python-bugs-list] [Bug #113811] Python 2.0 beta 1 -- urllib.urlopen() fails
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 9 Oct 2000 14:08:22 -0700
Bug #113811, was updated on 2000-Sep-07 09:45
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Closed
Resolution: Works For Me
Bug Group: Irreproducible
Priority: 3
Summary: Python 2.0 beta 1 -- urllib.urlopen() fails
Details: In performing a urllib.urlopen(url) with "url" containing a valid URL, I got the following error message:
Traceback (most recent call last):
File "IGNRatings.py", line 249, in ?
main(sys.argv[1:])
File "IGNRatings.py", line 132, in main
inStream = urllib.urlopen(url)
File "E:\Python20\lib\urllib.py", line 61, in urlopen
return _urlopener.open(url)
File "E:\Python20\lib\urllib.py", line 163, in open
return getattr(self, name)(url)
File "E:\Python20\lib\urllib.py", line 259, in open_http
h = httplib.HTTP(host)
File "E:\Python20\lib\httplib.py", line 626, in __init__
self._conn = self._connection_class(host, port)
File "E:\Python20\lib\httplib.py", line 325, in __init__
self._set_hostport(host, port)
File "E:\Python20\lib\httplib.py", line 332, in _set_hostport
port = int(host[i+1:])
ValueError: invalid literal for int():
I looked into this a tiny bit and found that HTTPConnection.__init__() is called with host="http:" -- probably not the right thing. Python 1.6 works correctly.
Thanks,
Bob Alexander
bobalex@home.com
Follow-Ups:
Date: 2000-Sep-07 15:02
By: jhylton
Comment:
Please do triage on this bug.
-------------------------------------------------------
Date: 2000-Sep-11 15:04
By: gvanrossum
Comment:
My suspicion is that this is caused by an invalid URL.
The stacktrace doesn't show what URL is being used, but I bet that on close inspection there's a tiny problem with it.
We'll have to close this for lack of information unless the original submittor can help us to debug this by printing the value of url in urlopen().
-------------------------------------------------------
Date: 2000-Oct-06 09:11
By: jhylton
Comment:
Have not heard back from original submittor. I do not believe this is a bug and do not intend to fix it for 2.0. Waiting a little longer to hear from Bob before closing this report.
-------------------------------------------------------
Date: 2000-Oct-09 14:08
By: jhylton
Comment:
Still no response. Closing.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=113811&group_id=5470