You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
urllib.URLopener's http_error_default() is supposed to raise IOError on failure, but does this with an invalid number of arguments, resulting in a TypeError:
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib.py", line 357, in http_error_default
raise IOError('http error', errcode, errmsg, headers)
TypeError: EnvironmentError expected at most 3 arguments, got 4
removing the extraneous "headers" argument, the raised exception works as intended:
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib.py", line 357, in http_error_default
raise IOError, ('http error', errcode, errmsg)
IOError: [Errno http error] 401: 'Unauthorized'
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: