[Python-bugs-list] [Bug #110692] urllib.URLopener does not work with proxies (PR#67)

noreply@sourceforge.net noreply@sourceforge.net
Fri, 15 Sep 2000 12:13:19 -0700


Bug #110692, was updated on 2000-Jul-31 14:15
Here is a current snapshot of the bug.

Project: Python
Category: Library
Status: Closed
Resolution: None
Bug Group: None
Priority: 5
Summary: urllib.URLopener does not work with proxies (PR#67)

Details: Jitterbug-Id: 67
Submitted-By: andrew@fc.hp.com
Date: Thu, 26 Aug 1999 16:20:02 -0400 (EDT)
Version: 1.5.1
OS: 


When using urllib.URLopener(proxy) (instead of setting _PROXY env variables and

calling urllib.openurl(),
you get the following error message:

 File "./watchdog.py", line 118, in main
    url.open(urltocheck)
  File "/usr/lib/python1.5/urllib.py", line 158, in open
    return getattr(self, name)(url)
  File "/usr/lib/python1.5/urllib.py", line 258, in open_http
    return addinfourl(fp, headers, "http:" + url)
TypeError: illegal argument type for built-in operation 

When using explicti proxies, url is a tuple instead of a string.  You can't 
concatanate a tuple to a string, so the operation fails.

 



====================================================================
Audit trail:
Mon Aug 30 12:40:45 1999	guido	moved from incoming to open

Follow-Ups:

Date: 2000-Sep-05 13:27
By: loewis

Comment:
This is likely incorrect usage of the module. The proxy argument must
be a dictionary mapping strings of protocol names to  strings of URLs.
-------------------------------------------------------

Date: 2000-Sep-07 15:05
By: jhylton

Comment:
Please do triage on this bug.
-------------------------------------------------------

Date: 2000-Sep-14 13:34
By: fdrake

Comment:
Assigned to Jeremy since he's more familiar with this module.
-------------------------------------------------------

Date: 2000-Sep-15 12:13
By: jhylton

Comment:
This report doesn't make any sense.  The method that raises the exception open_http explicitly checks for a url that is a tuple and sets the local var url to be the second element of the tuple.  I suspect Martin is right; the submittor used the module incorrectly.  Will check by email, but am closing this anyway.

-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110692&group_id=5470