0

Been following a Python specialization on Coarsera and figured I'd try something out on my own! First thing I run into before I even began was this:

C:\Users\kurts\Python>django-admin startproject Kurtain

C:\Users\kurts\Python>cd kurtain

C:\Users\kurts\Python\Kurtain>manage.py runserver
Performing system checks...

System check identified no issues (0 silenced).

You have 14 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.
February 27, 2018 - 18:59:12
Django version 2.0.2, using settings 'Kurtain.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x00000296A6625048>
Traceback (most recent call last):
  File "C:\Users\kurts\AppData\Local\Programs\Python\Python36\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\kurts\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\commands\runserver.py", line 143, in inner_run
    ipv6=self.use_ipv6, threading=threading, server_cls=self.server_cls)
  File "C:\Users\kurts\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\servers\basehttp.py", line 163, in run
    httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6)
  File "C:\Users\kurts\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\servers\basehttp.py", line 66, in __init__
    super().__init__(*args, **kwargs)
  File "C:\Users\kurts\AppData\Local\Programs\Python\Python36\lib\socketserver.py", line 453, in __init__
    self.server_bind()
  File "C:\Users\kurts\AppData\Local\Programs\Python\Python36\lib\wsgiref\simple_server.py", line 50, in server_bind
    HTTPServer.server_bind(self)
  File "C:\Users\kurts\AppData\Local\Programs\Python\Python36\lib\http\server.py", line 138, in server_bind
    self.server_name = socket.getfqdn(host)
  File "C:\Users\kurts\AppData\Local\Programs\Python\Python36\lib\socket.py", line 673, in getfqdn
    hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 1: invalid start byte

Reading other questions from around here I figured something was missing from the installed files...? But even after a reinstall of django it's the same errors!

I run on windows10, python3.6 and django2.0.2

Joe
  • 41,484
  • 20
  • 104
  • 125

2 Answers2

0

You did not apply migrations, so you need to run 'python manage.py migrate'. System writes to you about it.

Anatoly
  • 3,266
  • 4
  • 17
  • 28
0

The above answer while correct, was not the sollution. I was following a guide on the django site, and it told me about the migrations and that we would take care of that in a later chapter.

However I managed to solve this by changing my computer name, it contained a non utf8 character(Im swedish and was using 'รถ').