正在学习ython编程 从入门到实践 第18章Django入门,使用Win10。
创建了虚拟环境后运行python manage.py runserver报错
(ll_env) C:\Users\Administrator\Desktop\pythonwork\mywork\s18\learning_log>python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
May 03, 2021 - 21:49:48
Django version 3.2, using settings 'learning_log.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
Exception in thread django-main-thread:
Traceback (most recent call last):
File "D:\python35\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "D:\python35\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Administrator\Desktop\pythonwork\mywork\s18\learning_log\ll_env\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "C:\Users\Administrator\Desktop\pythonwork\mywork\s18\learning_log\ll_env\lib\site-packages\django\core\management\commands\runserver.py", line 139, in inner_run
run(self.addr, int(self.port), handler,
File "C:\Users\Administrator\Desktop\pythonwork\mywork\s18\learning_log\ll_env\lib\site-packages\django\core\servers\basehttp.py", line 210, in run
httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6)
File "C:\Users\Administrator\Desktop\pythonwork\mywork\s18\learning_log\ll_env\lib\site-packages\django\core\servers\basehttp.py", line 71, in __init__
super().__init__(*args, **kwargs)
File "D:\python35\lib\socketserver.py", line 452, in __init__
self.server_bind()
File "D:\python35\lib\wsgiref\simple_server.py", line 50, in server_bind
HTTPServer.server_bind(self)
File "D:\python35\lib\http\server.py", line 140, in server_bind
self.server_name = socket.getfqdn(host)
File "D:\python35\lib\socket.py", line 756, in getfqdn
hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 0: invalid continuation byte
小白不大懂。。。。。忘大神指教!!!
发一下代码看看
您好,我是有问必答小助手,您的问题已经有小伙伴解答了,您看下是否解决,可以追评进行沟通哦~
如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~
ps:问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632
非常感谢您使用有问必答服务,为了后续更快速的帮您解决问题,现诚邀您参与有问必答体验反馈。您的建议将会运用到我们的产品优化中,希望能得到您的支持与协助!
速戳参与调研>>>https://t.csdnimg.cn/Kf0y
已经解决,我电脑的名字是“赵”,导致这个字符bug,把名字改成英文就行了