Python django socketio-SocketIOHandler错误

Python django socketio-SocketIOHandler错误,python,django,sockets,socket.io,django-socketio,Python,Django,Sockets,Socket.io,Django Socketio,我无法使用,我收到以下错误: AttributeError: 'SocketIOHandler' object has no attribute 'response_headers_list' 终端: Traceback (most recent call last): File "/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site-packages/gevent/greenlet.py", line 327, i

我无法使用,我收到以下错误:

AttributeError: 'SocketIOHandler' object has no attribute 'response_headers_list'
终端:

Traceback (most recent call last):
  File "/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site-packages/gevent/greenlet.py", line 327, in run
    result = self._run(*self.args, **self.kwargs)
  File "/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site-packages/socketio/server.py", line 49, in handle
    handler.handle()
  File "/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site-packages/gevent/pywsgi.py", line 184, in handle
    result = self.handle_one_request()
  File "/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site-packages/gevent/pywsgi.py", line 321, in handle_one_request
    self.handle_one_response()
  File "/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site-packages/socketio/handler.py", line 58, in handle_one_response
    self.handle_one_response(call_wsgi_app=False)
TypeError: handle_one_response() got an unexpected keyword argument 'call_wsgi_app'
<Greenlet at 0x10247ac30: <bound method SocketIOServer.handle of <SocketIOServer at 0x1028ce8d0 fileno=5 address=127.0.0.1:8000>>(<socket at 0x102976210 fileno=[Errno 9] Bad file d, ('127.0.0.1', 51457))> failed with TypeError

Traceback (most recent call last):
  File "/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site-packages/gevent/greenlet.py", line 327, in run
    result = self._run(*self.args, **self.kwargs)
  File "/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site-packages/socketio/server.py", line 49, in handle
    handler.handle()
  File "/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site-packages/gevent/pywsgi.py", line 184, in handle
    result = self.handle_one_request()
  File "/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site-packages/gevent/pywsgi.py", line 321, in handle_one_request
    self.handle_one_response()
  File "/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site-packages/socketio/handler.py", line 68, in handle_one_response
    jobs = self.transport.connect(session, request_method)
  File "/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site-packages/socketio/transports.py", line 92, in connect
    self.write_packed(session_id)
  File "/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site-packages/socketio/transports.py", line 19, in write_packed
    self.write(data)
  File "/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site-packages/socketio/transports.py", line 22, in write
    if 'Content-Length' not in self.handler.response_headers_list:
AttributeError: 'SocketIOHandler' object has no attribute 'response_headers_list'
<Greenlet at 0x10247ac30: <bound method SocketIOServer.handle of <SocketIOServer at 0x1028ce8d0 fileno=5 address=127.0.0.1:8000>>(<socket at 0x102976210 fileno=[Errno 9] Bad file d, ('127.0.0.1', 51460))> failed with AttributeError
回溯(最近一次呼叫最后一次):
文件“/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site packages/gevent/greenlet.py”,第327行,运行中
结果=self.\u运行(*self.args,**self.kwargs)
文件“/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site packages/socketio/server.py”,第49行,在handle中
handler.handle()
handle中的文件“/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site packages/gevent/pywsgi.py”,第184行
结果=self.handle\u one\u请求()
文件“/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site packages/gevent/pywsgi.py”,第321行,处理请求
self.handle\u one\u response()
文件“/Volumes/DATA/Projekti/virtualenv/caffetouch/lib/python2.7/site packages/socketio/handler.py”,handle\u one\u响应中的第58行
self.handle\u one\u响应(call\u wsgi\u app=False)
TypeError:handle\u one\u response()获得意外的关键字参数“call\u wsgi\u app”

希望不会太晚。这实际上是一个兼容性问题。您需要卸载一些较新的软件包。看

这是我的配置的一部分。它起作用了

$ pip list
Django (1.6.7)
django-socketio (0.3.8)
gevent (0.13.6)
gevent-socketio (0.2.1)
gevent-websocket (0.2.3)
greenlet (0.4.5)
pip (1.5.6)
setuptools (6.0.2)
sphinx-me (0.3)

如果您使用的是django 1.8或更高版本,则需要卸载新版本,并使用给定命令安装以前的版本:

pip install django-socketio==0.3.9
pip uninstall gevent-socketio gevent
pip install gevent-socketio==0.2.1 gevent==0.13.6 
有关更多详细信息,请参阅以下线程: