Answer the question
In order to leave comments, you need to log in
Error starting Django server?
Help solve this problem.
Django version: 3.0.8
Python version: 3.8.3
Thanks for your help)
D:\Django\myfirst>python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
You have 17 unapplied migration(s). Your project may not work properly until you
apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
July 12, 2020 - 22:19:21
Django version 3.0.8, 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\Ruslan\AppData\Local\Programs\Python\Python38-32\lib\threading.py
", line 932, in _bootstrap_inner
self.run()
File "C:\Users\Ruslan\AppData\Local\Programs\Python\Python38-32\lib\threading.py
", line 870, in run
self._target(*self._args, **self ._kwargs)
File "C:\Users\Ruslan\AppData\Local\Programs\Python\Python38-32\lib\site-packa
ges\django\utils\autoreload.py", line 53, in wrapper
fn(*args, **kwargs)
File "C:\Users\Ruslan\AppData\Local\Programs\Python\Python38-32\lib\site-packa
ges\django\core\management\commands\runserver.py", line 138, in inner_run
run(self.addr, int(self.port), handler,
File "C:\Users\Ruslan\AppData\Local\Programs\Python\Python38-32\lib\site-packa
ges\django\core\servers\basehttp .py", line 206, in run
httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6)
File "C:\Users\Ruslan\AppData\Local\Programs\Python\Python38-32\lib\site-packa
ges\django \core\servers\basehttp.py", line 67, in __init__
super().__init__(*args, **kwargs)
File "C:\Users\Ruslan\AppData\Local\Programs\Python\Python38-32\lib \socketserv
er.py", line 452, in __init__
self.server_bind()
File "C:\Users\Ruslan\AppData\Local\Programs\Python\Python38-32\lib\wsgiref\
simple_server.py", line 50 , in server_bind
HTTPServer.server_bind(self)
File "C:\Users\Ruslan\AppData\Local\Programs\Python\Python38-32\lib\http\serve
r.py", line 140, in server_bind
self.server_name = socket.getfqdn( host)
File "C:\Users\Ruslan\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 0xd0 in position 0: invalid
continuation byte
Answer the question
In order to leave comments, you need to log in
It never happened, and here it is again. Duy in the search, tired of this question.
This is a bug in Python 3.4+: Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname.
As a workaround, try passing the hostname as an ip address (e.g. python manage.py runserver 127.0.0.1:8000) or rename the host so there are no non-ASCII characters in the name.
https://ru.stackoverflow.com/a/565643
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question