Qvint01
@Qvint01

Почему django не работает?

Приветствую, при запуске django выдаёт следующее (и сайт не загружается) :

spoiler

07, 2020 - 17:21:32
Django version 3.0.3, using settings 'myfirst.settings'
Starting development server at 127.0.0.1:8000
Quit the server with CTRL-BREAK.
Exception in thread django-main-thread:
Traceback (most recent call last):
File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\thread
ing.py", line 932, in _bootstrap_inner
self.run()
File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\thread
ing.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-p
ackages\django\utils\autoreload.py", line 53, in wrapper
fn(*args, **kwargs)
File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-p
ackages\django\core\management\commands\runserver.py", line 138, in inner_r
un
run(self.addr, int(self.port), handler,
File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-p
ackages\django\core\servers\basehttp.py", line 206, in run
httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6)
File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-p
ackages\django\core\servers\basehttp.py", line 67, in __init__
super().__init__(*args, **kwargs)
File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\socket
server.py", line 452, in __init__
self.server_bind()
File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\wsgire
f\simple_server.py", line 50, in server_bind
HTTPServer.server_bind(self)
File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\http\s
erver.py", line 139, in server_bind
self.server_name = socket.getfqdn(host)
File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\socket
.py", line 756, in getfqdn
hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcf in position 6: inv
alid continuation byte


В чём может заключаться ошибка, и как её исправить?
  • Вопрос задан
  • 222 просмотра
Решения вопроса 1
sergey-gornostaev
@sergey-gornostaev Куратор тега Django
Седой и строгий
Проблема в том, что имя вашего компьютера содержит кириллические символы.

Hostnames are composed of series of labels concatenated with dots, as are all domain names. For example, "en.wikipedia.org" is a hostname. Each label must be between 1 and 63 characters long, and the entire hostname (including the delimiting dots but not a trailing dot) has a maximum of 253 ASCII characters.

The Internet standards for protocols mandate that component hostname labels may contain only the ASCII letters 'a' through 'z' (in a case-insensitive manner), the digits '0' through '9', and the hyphen ('-'). The original specification of hostnames in RFC 952, mandated that labels could not start with a digit or with a hyphen, and must not end with a hyphen. However, a subsequent specification (RFC 1123) permitted hostname labels to start with digits. No other symbols, punctuation characters, or white space are permitted.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы