UnicodeDecodeError:' utf-8'编解码器不能解码位置0中的字节0xdd:无效的连续字节

时间:2015-06-05 11:10:23

标签: python visual-studio-2013 flask syntax-error

当我尝试在VisualStudio中调试Hello Flask时,出现此错误:

  

UnicodeDecodeError :' utf-8'编解码器不能解码位置0中的字节0xdd:无效的连续字节

我正在使用Python 3.4,使用Python工具的VisualStudio社区。这是完整的日志:

The Python REPL process has exited
 * Running on http://localhost:5555/ (Press CTRL+C to quit)
Traceback (most recent call last):
File "c:\users\xxx\documents\visual studio 2013\Projects\FlaskFirstTest \FlaskFirstTest\app.py", line 24, in <module>
app.run(HOST, PORT)
File "c:\users\xxx\documents\visual studio 2013\Projects\FlaskFirstTest\FlaskFirstTest\env\lib\site-packages\flask\app.py", line 772, in run
run_simple(host, port, self, **options)
File "c:\users\xxx\documents\visual studio 2013\Projects\FlaskFirstTest\FlaskFirstTest\env\lib\site-packages\werkzeug\serving.py", line 625, in run_simple
inner()
File "c:\users\xxx\documents\visual studio 2013\Projects\FlaskFirstTest\FlaskFirstTest\env\lib\site-packages\werkzeug\serving.py", line 603, in inner passthrough_errors, ssl_context).serve_forever()
File "c:\users\xxx\documents\visual studio 2013\Projects\FlaskFirstTest\FlaskFirstTest\env\lib\site-packages\werkzeug\serving.py", line 512, in make_server
passthrough_errors, ssl_context)
File "c:\users\xxx\documents\visual studio 2013\Projects\FlaskFirstTest\FlaskFirstTest\env\lib\site-packages\werkzeug\serving.py", line 440, in __init__
HTTPServer.__init__(self, (host, int(port)), handler)
File "C:\Python34\lib\socketserver.py", line 429, in __init__
self.server_bind()
File "C:\Python34\lib\http\server.py", line 135, in server_bind
self.server_name = socket.getfqdn(host)
File "C:\Python34\lib\socket.py", line 460, in getfqdn
hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xdd in position 0: invalid continuation byte

我想知道导致此错误的原因。

0 个答案:

没有答案