Найти - Пользователи
Полная версия: UnicodeDecodeError: 'utf-8' Flask
Начало » Web » UnicodeDecodeError: 'utf-8' Flask
Помогите решить проблему. Обычная программа для отображения текста:

from flask import Flask
app = Flask(__name__)

def index():
return ‘<h1>Hello world!</h1>’

def user(name):
return ‘<h1>Hi, %s!</h1>’ % name

if __name__=='__main__':
При запуске, которой выдается ошибка:
* Serving Flask app “flask2” (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
* Restarting with stat
* Debugger is active!
* Debugger PIN: 720-831-746
Exception in thread Thread-1:
Traceback (most recent call last):
File “C:\\Python38\lib\threading.py”, line 932, in _bootstrap_inner
File “C:\\Python38\lib\threading.py”, line 870, in run
self._target(*self._args, **self._kwargs)
File “C:\\Roaming\Python\Python38\site-packages\werkzeug\serving.py”, line 996, in inner
srv = make_server(
File “C:\\Roaming\Python\Python38\site-packages\werkzeug\serving.py”, line 847, in make_server
return ThreadedWSGIServer(
File “C:\\Roaming\Python\Python38\site-packages\werkzeug\serving.py”, line 740, in __init__
HTTPServer.__init__(self, server_address, handler)
File “C:\\Python38\lib\socketserver.py”, line 452, in __init__
File “C:\\Python38\lib\http\server.py”, line 140, in server_bind
self.server_name = socket.getfqdn(host)
File “C:\\Python38\lib\socket.py”, line 756, in getfqdn
hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: ‘utf-8’ codec can't decode byte 0xcc in position 0: invalid continuation byte

Process finished with exit code -1
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB