亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

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.

April 22, 2020 - 23:44:47

Django version 3.0.3, using settings 'demo1.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 "F:\Anaconda\lib\threading.py", line 926, in _bootstrap_inner

? ? self.run()

? File "F:\Anaconda\lib\threading.py", line 870, in run

? ? self._target(*self._args, **self._kwargs)

? File "F:\Anaconda\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper

? ? fn(*args, **kwargs)

? File "F:\Anaconda\lib\site-packages\django\core\management\commands\runserver.py", line 139, in inner_run

? ? ipv6=self.use_ipv6, threading=threading, server_cls=self.server_cls)

? File "F:\Anaconda\lib\site-packages\django\core\servers\basehttp.py", line 206, in run

? ? httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6)

? File "F:\Anaconda\lib\site-packages\django\core\servers\basehttp.py", line 67, in __init__

? ? super().__init__(*args, **kwargs)

? File "F:\Anaconda\lib\socketserver.py", line 452, in __init__

? ? self.server_bind()

? File "F:\Anaconda\lib\wsgiref\simple_server.py", line 50, in server_bind

? ? HTTPServer.server_bind(self)

? File "F:\Anaconda\lib\http\server.py", line 139, in server_bind

? ? self.server_name = socket.getfqdn(host)

? File "F:\Anaconda\lib\socket.py", line 676, in getfqdn

? ? hostname, aliases, ipaddrs = gethostbyaddr(name)

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc2 in position 2: invalid continuation byte

運行時報出該錯誤怎么解決??

正在回答

1 回答

原來是計算機的名稱是中文引起的

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

python manage.py runserver時報錯

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號