|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
我在使用Flask框架时,运行app.run(host='0.0.0.0')时报错- from flask import Flask
- app=Flask(__name__)
- @app.route('/')
- def index():
- return 'hessllo world'
- if __name__=='__main__':
- app.run(host='0.0.0.0')
复制代码
这是他的错误信息- Traceback (most recent call last):
- File "C:/Users/dell/Desktop/new/python_pachong/chat_robat.py", line 21, in <module>
- app.run(host='0.0.0.0')
- File "C:\Users\dell\AppData\Local\Programs\Python\Python36-32\lib\site-packages\flask\app.py", line 841, in run
- run_simple(host, port, self, **options)
- File "C:\Users\dell\AppData\Local\Programs\Python\Python36-32\lib\site-packages\werkzeug\serving.py", line 739, in run_simple
- inner()
- File "C:\Users\dell\AppData\Local\Programs\Python\Python36-32\lib\site-packages\werkzeug\serving.py", line 699, in inner
- fd=fd)
- File "C:\Users\dell\AppData\Local\Programs\Python\Python36-32\lib\site-packages\werkzeug\serving.py", line 593, in make_server
- passthrough_errors, ssl_context, fd=fd)
- File "C:\Users\dell\AppData\Local\Programs\Python\Python36-32\lib\site-packages\werkzeug\serving.py", line 504, in __init__
- HTTPServer.__init__(self, (host, int(port)), handler)
- File "C:\Users\dell\AppData\Local\Programs\Python\Python36-32\lib\socketserver.py", line 453, in __init__
- self.server_bind()
- File "C:\Users\dell\AppData\Local\Programs\Python\Python36-32\lib\http\server.py", line 138, in server_bind
- self.server_name = socket.getfqdn(host)
- File "C:\Users\dell\AppData\Local\Programs\Python\Python36-32\lib\socket.py", line 673, in getfqdn
- hostname, aliases, ipaddrs = gethostbyaddr(name)
- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc9 in position 0: invalid continuation byte
复制代码
有没有大佬帮忙看一下,拜托了 |
|