简体   繁体   中英

Python Flask - UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 0: invalid continuation byte

When I run a code here is an error Python files are on the USB flash drive It is an Error

Traceback (most recent call last):
  File "e:/1/test.py", line 15, in <module>
    app.run(port=8080, host='127.0.0.1')
  File "E:\python\lib\site-packages\flask\app.py", line 990, in run
    run_simple(host, port, self, **options)
  File "E:\python\lib\site-packages\werkzeug\serving.py", line 1052, in run_simple
    inner()
  File "E:\python\lib\site-packages\werkzeug\serving.py", line 996, in inner
    srv = make_server(
  File "E:\python\lib\site-packages\werkzeug\serving.py", line 847, in make_server
    return ThreadedWSGIServer(
  File "E:\python\lib\site-packages\werkzeug\serving.py", line 740, in __init__
    HTTPServer.__init__(self, server_address, handler)
  File "E:\python\lib\socketserver.py", line 452, in __init__
    self.server_bind()
  File "E:\python\lib\http\server.py", line 139, in server_bind
    self.server_name = socket.getfqdn(host)
  File "E:\python\lib\socket.py", line 756, in getfqdn
    hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 0: invalid continuation byte

只需要将计算机重命名为英文符号

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM