Flask-SocketIO: AttributeError: 'Response' object has no attribute 'status_code'
I continually get the error listed below. Nothing seems to break but I’d like to clean it up. Any ideas what causes this?
2016-02-03 21:26:02 [33724] [ERROR] Error handling request
Traceback (most recent call last):
File "/Users/brianclark/Desktop/Projects/HDP/application/api/venv/lib/python2.7/site-packages/gunicorn/workers/async.py", line 45, in handle
self.handle_request(listener, req, client, addr)
File "/Users/brianclark/Desktop/Projects/HDP/application/api/venv/lib/python2.7/site-packages/gunicorn/workers/async.py", line 102, in handle_request
resp.close()
File "/Users/brianclark/Desktop/Projects/HDP/application/api/venv/lib/python2.7/site-packages/gunicorn/http/wsgi.py", line 369, in close
self.send_headers()
File "/Users/brianclark/Desktop/Projects/HDP/application/api/venv/lib/python2.7/site-packages/gunicorn/http/wsgi.py", line 284, in send_headers
tosend = self.default_headers()
File "/Users/brianclark/Desktop/Projects/HDP/application/api/venv/lib/python2.7/site-packages/gunicorn/http/wsgi.py", line 265, in default_headers
elif self.should_close():
File "/Users/brianclark/Desktop/Projects/HDP/application/api/venv/lib/python2.7/site-packages/gunicorn/http/wsgi.py", line 198, in should_close
if self.status_code < 200 or self.status_code in (204, 304):
AttributeError: 'Response' object has no attribute 'status_code'
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 9
- Comments: 42 (14 by maintainers)
How are you starting the server? If you are using gunicorn, please make sure you run with just one worker (
--workers 1).You can’t use multiple workers with Gunicorn when you have the Flask-SocketIO extension. Try one worker.