超棒史迪仔 2021-05-03 22:02 采纳率: 0%
浏览 173

python manage.py runserver报错

正在学习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

小白不大懂。。。。。忘大神指教!!!

  • 写回答

4条回答 默认 最新

  • 关注

    发一下代码看看

    评论

报告相同问题?