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

Gunicorn error: 'Response' object has no attribute 'status_code' #2455

Closed
hongquan opened this issue Oct 7, 2016 · 1 comment
Closed

Gunicorn error: 'Response' object has no attribute 'status_code' #2455

hongquan opened this issue Oct 7, 2016 · 1 comment
Labels

Comments

@hongquan
Copy link
Member

hongquan commented Oct 7, 2016

I followed the INSTALLATION_LOCAL.md doc. I ran the web app with this command:

INTEGRATE_SOCKETIO=true gunicorn app:app -k eventlet -b localhost:5000

After testing a while, I got this error in console:

[2016-10-07 10:27:43 +0000] [23475] [ERROR] Error handling request /socket.io/?EIO=3&transport=websocket&sid=a5d16c6d35624ad1a57b8d0b957e6831
Traceback (most recent call last):
  File "/home/quan/Works/Envs/oevent/local/lib/python2.7/site-packages/gunicorn/workers/async.py", line 52, in handle
    self.handle_request(listener_name, req, client, addr)
  File "/home/quan/Works/Envs/oevent/local/lib/python2.7/site-packages/gunicorn/workers/async.py", line 112, in handle_request
    resp.close()
  File "/home/quan/Works/Envs/oevent/local/lib/python2.7/site-packages/gunicorn/http/wsgi.py", line 418, in close
    self.send_headers()
  File "/home/quan/Works/Envs/oevent/local/lib/python2.7/site-packages/gunicorn/http/wsgi.py", line 334, in send_headers
    tosend = self.default_headers()
  File "/home/quan/Works/Envs/oevent/local/lib/python2.7/site-packages/gunicorn/http/wsgi.py", line 315, in default_headers
    elif self.should_close():
  File "/home/quan/Works/Envs/oevent/local/lib/python2.7/site-packages/gunicorn/http/wsgi.py", line 238, in should_close
    if self.status_code < 200 or self.status_code in (204, 304):
AttributeError: 'Response' object has no attribute 'status_code'

Update:

@hongquan hongquan added the bug label Oct 7, 2016
@aviaryan
Copy link
Member

aviaryan commented Oct 7, 2016

It is a gunicorn issue (miguelgrinberg/Flask-SocketIO#223 (comment)) and it doesn't lead to any data loss or problems. (miguelgrinberg/Flask-SocketIO#223 (comment))
I don't think there is any thing we can do here. You can check the open issue on gunicorn. benoitc/gunicorn#1210

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants