This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nobody
Recipients
Date 2000-09-12.16:16:44
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
This might be related to bug #110692, since it seems to be related to proxies.

A program I have that works under older versions of Python now fails with this traceback:


Traceback (most recent call last):
  File "IGNRatings.py", line 289, in ?
    main(sys.argv[1:])
  File "IGNRatings.py", line 133, 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 624, in __init__
    self._conn = self._connection_class(host, port)
  File "E:\Python20\lib\httplib.py", line 324, in __init__
    self._set_hostport(host, port)
  File "E:\Python20\lib\httplib.py", line 330, in _set_hostport
    port = int(host[i+1:])
ValueError: invalid literal for int():


My URL is nothing special:

    'http://dreamcast.ign.com/review_lists/a.html'


I have tracked the problem down a bit:

In urllib.py, line 147, the statement

    proxy = self.proxies[type]

assigns the string

    'http://http://proxy:8080'

to "proxy". My guess is that's not right. Anyway, the following line assigns

    type = 'http'
    proxy = '//http://proxy:8080'

and the next line assigns

    host = 'http:'
    selector = '//proxy:8080'

'http:' as a host name then goes on to cause trouble when an HTTPConnection is constructed.

Hope this info helps you track it down.

Bob Alexander
bobalex@home.com
History
Date User Action Args
2007-08-23 13:50:29adminlinkissue214256 messages
2007-08-23 13:50:29admincreate