Urllib2 upgrade is breaking urlopen()
dj00302003 at yahoo.com
Fri Jan 23 03:18:51 CET 2004
We have a lot of simple code using 'urllib', that basically
just goes out and opens and read()'s some http url. Very basic,
ten line scripts, and they work fine with urllib.
We want to use urllib2 for everything, though, but when we
do we get:
File "/usr/lib/python2.3/urllib2.py", line 306, in _call_chain
result = func(*args)
File "/usr/lib/python2.3/urllib2.py", line 463, in http_error_302
self.inf_msg + msg, headers, fp)
urllib2.HTTPError: HTTP Error 302: The HTTP server returned a redirect
error that would lead to an infinite loop.
The last 30x error message was:
These redirect errors just don't happen with urrlib.urlopen(), and I
only find a few posts on deja that even mention this problem. Is
there a known workaround?
More information about the Python-list