[ python-Bugs-1507166 ] HTTPResponse instance has no attribute 'code'

SourceForge.net noreply at sourceforge.net
Fri Jun 16 11:32:42 CEST 2006


Bugs item #1507166, was opened at 2006-06-16 11:32
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1507166&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: yodalf (yodalf)
Assigned to: Nobody/Anonymous (nobody)
Summary: HTTPResponse instance has no attribute 'code'

Initial Comment:
I get this error :
Traceback (most recent call last):
  File "ogbot.py", line 247, in ?
    main()
  File "ogbot.py", line 89, in main
    handle = urlopen(req)
  File "/usr/lib/python2.4/urllib2.py", line 130, in
urlopen
    return _opener.open(url, data)
  File "/usr/lib/python2.4/urllib2.py", line 364, in open
    response = meth(req, response)
  File "/usr/lib/python2.4/urllib2.py", line 468, in
http_response
    code, msg, hdrs = response.code, response.msg,
response.info()
AttributeError: HTTPResponse instance has no attribute
'code'

When I use 
req =
Request("http://some/url.php?session=%s"%(session),
data, headers)
handle = urlopen(req)



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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1507166&group_id=5470


More information about the Python-bugs-list mailing list