Kri*_*abo 3 python flask python-3.5
我从他们的网站复制粘贴了烧瓶的“hello world”应用程序,并试图运行它。我在 Chrome 中收到一条错误消息说
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
Run Code Online (Sandbox Code Playgroud)
这是直接来自烧瓶网站的“hello world”应用程序
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World!'
if __name__ == '__main__':
app.debug = True
app.run()
Run Code Online (Sandbox Code Playgroud)
我尝试过的:
- 暂时禁用 Avast!
- 禁用 Windows 防火墙
-确保安装了flask模块
这实际上在几天前有效......
我不知道为什么 但当我改变
app.run()
Run Code Online (Sandbox Code Playgroud)
到
app.run(port=4996)
Run Code Online (Sandbox Code Playgroud)
它开始工作。不知道为什么默认端口会抛出错误。那好吧。