'ruserver'에 해당하는 글 1건

[문제] 서버를 작동시켜보자

python manage.py runserver

- 결과  :

System check identified no issues (0 silenced).
October 23, 2020 - 14:49:15
Django version 3.1.2, using settings 'insta.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\user\AppData\Local\Programs\Python\Python38\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\user\PycharmProjects\Instagram\venv\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\user\PycharmProjects\Instagram\venv\lib\site-packages\django\core\management\commands\runserver.py", line 139, in inner_run
    run(self.addr, int(self.port), handler,
  File "C:\Users\user\PycharmProjects\Instagram\venv\lib\site-packages\django\core\servers\basehttp.py", line 206, in run
    httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6)
  File "C:\Users\user\PycharmProjects\Instagram\venv\lib\site-packages\django\core\servers\basehttp.py", line 67, in __init__
    super().__init__(*args, **kwargs)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\socketserver.py", line 452, in __init__
    self.server_bind()
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\wsgiref\simple_server.py", line 50, in server_bind
    HTTPServer.server_bind(self)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\http\server.py", line 140, in server_bind
    self.server_name = socket.getfqdn(host)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\socket.py", line 756, in getfqdn
    hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb9 in position 0: invalid start byte
​

[해결책]

 

1. 먼저는 Sqlite3를 설치하자.

- 설치 및 환경변수 설정

- 결과 : 아래 명령어가 수행됨. 

python manage.py dbshell

[진짜 해결책]

- runserver 시 인코딩 문제 : 컴퓨터 이름이 한글로 되어 있어서 그런 것이었음..!!!

- 컴퓨터의 이름을 바꿔주고 재부팅하고 나서 실행하니 해결됨!!!


WRITTEN BY
choco-songyi

,