Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPResponse instance has no attribute 'code' #43513

Closed
yodalf mannequin opened this issue Jun 16, 2006 · 3 comments
Closed

HTTPResponse instance has no attribute 'code' #43513

yodalf mannequin opened this issue Jun 16, 2006 · 3 comments
Labels
stdlib Python modules in the Lib dir

Comments

@yodalf
Copy link
Mannequin

yodalf mannequin commented Jun 16, 2006

BPO 1507166

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:

assignee = None
closed_at = <Date 2006-06-17.07:54:16.000>
created_at = <Date 2006-06-16.09:32:39.000>
labels = ['library']
title = "HTTPResponse instance has no attribute 'code'"
updated_at = <Date 2006-06-17.07:54:16.000>
user = 'https://bugs.python.org/yodalf'

bugs.python.org fields:

activity = <Date 2006-06-17.07:54:16.000>
actor = 'yodalf'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2006-06-16.09:32:39.000>
creator = 'yodalf'
dependencies = []
files = []
hgrepos = []
issue_num = 1507166
keywords = []
message_count = 3.0
messages = ['28810', '28811', '28812']
nosy_count = 2.0
nosy_names = ['nnorwitz', 'yodalf']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1507166'
versions = ['Python 2.4']

@yodalf
Copy link
Mannequin Author

yodalf mannequin commented Jun 16, 2006

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)

@yodalf yodalf mannequin closed this as completed Jun 16, 2006
@yodalf yodalf mannequin added the stdlib Python modules in the Lib dir label Jun 16, 2006
@yodalf yodalf mannequin closed this as completed Jun 16, 2006
@yodalf yodalf mannequin added the stdlib Python modules in the Lib dir label Jun 16, 2006
@nnorwitz
Copy link
Mannequin

nnorwitz mannequin commented Jun 17, 2006

Logged In: YES
user_id=33168

Can you attach a file with a complete python program that
demonstrates this problem? Thanks.

@yodalf
Copy link
Mannequin Author

yodalf mannequin commented Jun 17, 2006

Logged In: YES
user_id=1278568

Sorry,
The problem came from an external module (urlgrabber) which
aparently was not up to date.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

0 participants