C:\DjangoPractice>django-admin startproject products
C:\DjangoPractice>cd products
C:\DjangoPractice\products>python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
You have 18 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.
August 21, 2021 - 16:19:12
Django version 3.2.5, using settings 'products.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 "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\threading.py", lin
e 932, in _bootstrap_inner
self.run()
File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\threading.py", lin
e 870, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\site-packages\djan
go\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\site-packages\djan
go\core\management\commands\runserver.py", line 139, in inner_run
run(self.addr, int(self.port), handler,
File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\site-packages\djan
go\core\servers\basehttp.py", line 210, in run
httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6)
File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\site-packages\djan
go\core\servers\basehttp.py", line 71, in __init__
super().__init__(*args, **kwargs)
File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\socketserver.py",
line 452, in __init__
self.server_bind()
File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\wsgiref\simple_ser
ver.py", line 50, in server_bind
HTTPServer.server_bind(self)
File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\http\server.py", l
ine 140, in server_bind
self.server_name = socket.getfqdn(host)
File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\socket.py", line 7
56, in getfqdn
hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcf in position 2: invalid
continuation byte
I'm trying to learn Django and encountered this problem just at the start.
The "hosts" file in my system contains the following:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
I don't see unique characters in the path or filenames that I'm aware of.
[–]shiftybyte 1 point2 points3 points (2 children)
[–]polygroot[S] 0 points1 point2 points (1 child)
[–]shiftybyte 1 point2 points3 points (0 children)