第一次新建Django项目runserver遇到的疑似编码问题

Unhandled exception in thread started by .wrapper at 0x0000022B0FBB0510>
Traceback (most recent call last):
  File "F:\2018.10\Envs\django_web_env\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
    fn(*args, **kwargs)
  File "F:\2018.10\Envs\django_web_env\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 "F:\2018.10\Envs\django_web_env\lib\site-packages\django\core\servers\basehttp.py", line 185, in run
    httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6)
  File "F:\2018.10\Envs\django_web_env\lib\site-packages\django\core\servers\basehttp.py", line 66, in __init__
    super().__init__(*args, **kwargs)
  File "f:\python36\Lib\socketserver.py", line 453, in __init__
    self.server_bind()
  File "f:\python36\Lib\wsgiref\simple_server.py", line 50, in server_bind
    HTTPServer.server_bind(self)
  File "f:\python36\Lib\http\server.py", line 138, in server_bind
    self.server_name = socket.getfqdn(host)
  File "f:\python36\Lib\socket.py", line 673, in getfqdn
    hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 0: invalid continuation byte

检查了好久,最后发现是在hostname处报错的,主机名?Ex?
原来是主机名不能用汉字…
第一次新建Django项目runserver遇到的疑似编码问题_第1张图片

你可能感兴趣的:(第一次新建Django项目runserver遇到的疑似编码问题)