运行PYTHON3.5下的开发服务器时提示UnicodedecodeError utf-8错误

rgt27013978 2017-03-15 04:26:54
C:\Users\ceb\AppData\Local\Programs\Python\Python35\python.exe C:/rgttest/project001/manage.py runserver 8000
Performing system checks...
System check identified no issues (0 silenced).
March 15, 2017 - 14:47:52
Django version 1.8.4, using settings 'project001.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 0x00000000042CC620>
Traceback (most recent call last):
File "C:\Users\ceb\AppData\Local\Programs\Python\Python35\lib\site-packages\django-1.8.4-py3.5.egg\django\utils\autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "C:\Users\ceb\AppData\Local\Programs\Python\Python35\lib\site-packages\django-1.8.4-py3.5.egg\django\core\management\commands\runserver.py", line 139, in inner_run
ipv6=self.use_ipv6, threading=threading)
File "C:\Users\ceb\AppData\Local\Programs\Python\Python35\lib\site-packages\django-1.8.4-py3.5.egg\django\core\servers\basehttp.py", line 191, in run
httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6)
File "C:\Users\ceb\AppData\Local\Programs\Python\Python35\lib\site-packages\django-1.8.4-py3.5.egg\django\core\servers\basehttp.py", line 76, in __init__
super(WSGIServer, self).__init__(*args, **kwargs)
File "C:\Users\ceb\AppData\Local\Programs\Python\Python35\lib\socketserver.py", line 443, in __init__
self.server_bind()
File "C:\Users\ceb\AppData\Local\Programs\Python\Python35\lib\site-packages\django-1.8.4-py3.5.egg\django\core\servers\basehttp.py", line 80, in server_bind
super(WSGIServer, self).server_bind()
File "C:\Users\ceb\AppData\Local\Programs\Python\Python35\lib\wsgiref\simple_server.py", line 50, in server_bind
HTTPServer.server_bind(self)
File "C:\Users\ceb\AppData\Local\Programs\Python\Python35\lib\http\server.py", line 140, in server_bind
self.server_name = socket.getfqdn(host)
File "C:\Users\ceb\AppData\Local\Programs\Python\Python35\lib\socket.py", line 658, in getfqdn
hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbc in position 0: invalid start byte



同样的环境,加两台机器并没有这个问题
...全文
359 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
rgt27013978 2017-03-23
  • 打赏
  • 举报
回复
自己解决了,尼马,还是中文目录的问题,“”USER“”目录在系统中为中文:用户。PYTHON不能安装在中文目录中
rgt27013978 2017-03-15
  • 打赏
  • 举报
回复
同样的环境,另两台机器并没有这个问题

37,721

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • IT.BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧