社长你好,最近刚开始学习Django,刚开就遇到问题,无法进行下去。。

<pre>

(dingdangmao) C:\Users\14573\Desktop\dingdangmao>python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
March 14, 2020 - 14:15:48
Django version 3.0.4, using settings 'ddm.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:\Python37\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "D:\Python37\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\14573\Desktop\dingdangmao\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper
fn(*args, **kwargs)
File "C:\Users\14573\Desktop\dingdangmao\lib\site-packages\django\core\management\commands\runserver.py", line 139, in inner_run
ipv6=self.use_ipv6, threading=threading, server_cls=self.server_cls)
File "C:\Users\14573\Desktop\dingdangmao\lib\site-packages\django\core\servers\basehttp.py", line 206, in run
httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6)
File "C:\Users\14573\Desktop\dingdangmao\lib\site-packages\django\core\servers\basehttp.py", line 67, in __init__
super().__init__(*args, **kwargs)
File "D:\Python37\lib\socketserver.py", line 449, in __init__
self.server_bind()
File "D:\Python37\lib\wsgiref\simple_server.py", line 50, in server_bind
HTTPServer.server_bind(self)
File "D:\Python37\lib\http\server.py", line 139, in server_bind
self.server_name = socket.getfqdn(host)
File "D:\Python37\lib\socket.py", line 676, in getfqdn
hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd6 in position 0: invalid continuation byte

</pre>

这是我第一次运行runserver后出现的反馈,我里面还没有写app,想着能够出现你教程第一节的成功界面,但是浏览器无法进入那个本地localhost:8000,最后一行显示了错误内容,但是不知道怎么修改?希望您能给予帮助,非常感谢!

涨见识0 涨水分0

** 文章讲述的内容可能你不赞同,不喜欢,但如果觉得观点新颖,内容独到,提高了你的知识面,帮你了解了你不懂的知识和知道了突发的新闻,这样的贴,希望能点涨见识,相反,到处转载,内容无聊,雷同,毫无建树,请点涨水分!

我要评论

提交评论
每个人都有自己的看法,登录以后马上发表。还没有账号?点击这里马上注册一个账号。

当前有1条评论

  • 繁花社长 :2020三月16号 01:21:02
    你电脑系统的hostname中间包含有非utf-8得字符
    修改你电脑的hostname,计算机名修改下,估计你的计算机名字是中文的,修改成英文的
    0 0 回复 举报

需要登录以后才能进行刚才的操作

  • 刚才的操作,需要登录以后才能继续,如果已经有账号,请点击登录,登录以后,会自动返回到当前页面进行刚才的操作。如果还没有账号,请点击注册。