属性错误: 'FlashPolicyServer'对象没有属性'kill'



当我使用 python manage.py runserver_socketio 运行 django 应用程序以及 django-socketio 应用程序时,我会收到以下错误

SocketIOServer running on 127.0.0.1:8001
KeyboardInterrupt
Thu Jul  6 22:04:52 2017
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 345, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 348, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 399, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/dist-packages/django_socketio-0.3.9-py2.7.egg/django_socketio/management/commands/runserver_socketio.py", line 65, in handle
server.kill()
File "/usr/local/lib/python2.7/dist-packages/socketio/server.py", line 43, in kill
self.policy_server.kill()
AttributeError: 'FlashPolicyServer' object has no attribute 'kill'

我错过了什么吗?

受到这个问题的启发,我尝试降级 gevent-socketio 和 gevent,它奏效了。

pip uninstall gevent-socketio gevent
pip install gevent-socketio==0.2.1 gevent==0.13.6

最新更新