安装频道后,为什么我的Django无法运行服务器?

时间:2016-12-01 12:57:40

标签: django python-3.4 django-channels

在安装“频道”之前,一切正常。 在我安装了频道之后,我在settings.py中的INSTALLED_APPS中添加了“频道”,然后当我执行$ python3 manage.py runserver时,我收到以下错误:

pi@raspberrypi:~/Desktop/project $ python3 manage.py runserver
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x75966300>

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/django/core/management/commands/runserver.py", line 113, in inner_run
autoreload.raise_last_exception()
  File "/usr/local/lib/python3.4/dist-packages/django/utils/autoreload.py", line 249, in raise_last_exception
six.reraise(*_exception)
  File "/usr/local/lib/python3.4/dist-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
  File "/usr/local/lib/python3.4/dist-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.4/dist-packages/django/apps/registry.py", line 115, in populate
app_config.ready()
  File "/home/pi/channels/channels/apps.py", line 22, in ready
monkeypatch_django()
  File "/home/pi/channels/channels/hacks.py", line 10, in monkeypatch_django
from .management.commands.runserver import Command as RunserverCommand
  File "/home/pi/channels/channels/management/commands/runserver.py", line 5, in <module>
from daphne.server import Server
  File "/usr/local/lib/python3.4/dist-packages/daphne/server.py", line 4, in <module>
from twisted.internet import reactor, defer
  File "/home/pi/twisted/src/twisted/internet/reactor.py", line 38, in <module>
from twisted.internet import default
  File "/home/pi/twisted/src/twisted/internet/default.py", line 56, in <module>
install = _getInstallFunction(platform)
  File "/home/pi/twisted/src/twisted/internet/default.py", line 44, in _getInstallFunction
from twisted.internet.epollreactor import install
  File "/home/pi/twisted/src/twisted/internet/epollreactor.py", line 24, in <module>
from twisted.internet import posixbase
  File "/home/pi/twisted/src/twisted/internet/posixbase.py", line 18, in <module>
from twisted.internet import error, udp, tcp
  File "/home/pi/twisted/src/twisted/internet/tcp.py", line 28, in <module>
from twisted.internet._newtls import (
  File "/home/pi/twisted/src/twisted/internet/_newtls.py", line 21, in <module>
from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
  File "/home/pi/twisted/src/twisted/protocols/tls.py", line 63, in <module>
from twisted.internet._sslverify import _setAcceptableProtocols
  File "/home/pi/twisted/src/twisted/internet/_sslverify.py", line 1870, in <module>
"ECDH+AESGCM:ECDH+CHACHA20:DH+AESGCM:DH+CHACHA20:ECDH+AES256:DH+AES256:"
  File "/home/pi/twisted/src/twisted/internet/_sslverify.py", line 1850, in fromOpenSSLCipherString
SSL.SSLv23_METHOD, SSL.OP_NO_SSLv2 | SSL.OP_NO_SSLv3)
  File "/home/pi/twisted/src/twisted/internet/_sslverify.py", line 1802, in _expandCipherString
ctx.set_cipher_list(cipherString.encode('ascii'))
TypeError: must be str, not bytes

我不知道发生了什么,我非常感谢所有的帮助。 我通过

安装了所有包
$ sudo pip3 install 

我正在使用的系统是RPi 3上的Raspbian。当我安装频道时,我收到了很多警告,这与此错误有什么关系吗? 我真的需要一些帮助,谢谢!

0 个答案:

没有答案