我正在学习django及其带来的各种可能性,但是我无法遍历几乎每个教程中找到的前几个步骤。
我成功安装了django-2.2.6,pytz-2019.3和sqlparse-0.3.0。然后,我将正确的目录设置到工作文件夹中,我使用了django-admin startproject mysite
,最后使用了python manage.py runserver
。
系统检查未发现问题(0静音)。
当我尝试连接到http://127.0.0.1:8000/上的本地计算机时,它可以很好地加载,但是随后我以cmd的形式得到了此输出,它将不允许我执行其他任何操作:
[26/Oct/2019 23:29:47] "GET / HTTP/1.1" 200 16348
[26/Oct/2019 23:29:47] "GET /static/admin/css/fonts.css HTTP/1.1" 200 423
[26/Oct/2019 23:29:47] "GET /static/admin/fonts/Roboto-Regular-webfont.woff HTTP/1.1" 200 85876
[26/Oct/2019 23:29:47] "GET /static/admin/fonts/Roboto-Light-webfont.woff HTTP/1.1" 200 85692
[26/Oct/2019 23:29:47] "GET /static/admin/fonts/Roboto-Bold-webfont.woff HTTP/1.1" 200 86184
Not Found: /favicon.ico
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 50150)
Traceback (most recent call last):
File "C:\Users\Arivald\AppData\Local\Programs\Python\Python37\lib\socketserver.py", line 650, in process_request_thread
self.finish_request(request, client_address)
File "C:\Users\Arivald\AppData\Local\Programs\Python\Python37\lib\socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Users\Arivald\AppData\Local\Programs\Python\Python37\lib\socketserver.py", line 720, in __init__
self.handle()
File "C:\Users\Arivald\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\servers\basehttp.py", line 171, in handle
self.handle_one_request()
File "C:\Users\Arivald\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\servers\basehttp.py", line 179, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
File "C:\Users\Arivald\AppData\Local\Programs\Python\Python37\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine.
我禁用了防病毒软件,以确保它不会干扰任何东西,但这无济于事。
有人不能帮我,因为我无法从这里继续。
编辑: 到目前为止,我已经卸载了python并安装了最新版本(在撰写本文时为3.8.0)。我创建了新的虚拟环境并在其中安装了django。我尝试禁用防病毒软件并使用其他浏览器。我仍然收到相同的错误,该错误不允许我继续在cmd中键入命令。
答案 0 :(得分:0)
欢迎堆栈溢出!听起来这是Python中的错误:
https://bugs.python.org/issue27682
已修复。如果您升级到最新版本的Python 3.7,则应将其修复:https://www.python.org/downloads/release/python-375/
祝你好运!