烧瓶调试不能在Anaconda下工作 [英] Flask debug not working under Anaconda
问题描述
只要使用标准的Hello World,就会出现这样的错误:
from flask import烧瓶
app =烧瓶(__ name__)
@ app.route(/)
def hello():
err
返回Hello World!
if __name__ ==__main__:
app.run(debug = True)
我的应用程序中断,但没有动态调试,我得到以下错误信息:
If您启用JavaScript,您还可以使用其他功能,如代码
执行(如果启用了evalex功能),自动粘贴
异常等等。
我启用了JavaScript,不知道为什么我收到此错误。任何想法?
编辑
我发现这个类似的帖子此处。看来,Flask找不到几个文件。
127.0.0.1 - - [23 / Feb / 2014 22:04 :37]GET /?__debugger__=yes&cmd=resource&f=style.css HTTP / 1.1404 -
我使用的是Anaconda,并且已经卸载并重新安装了Flask和Werzeug,但是仍然存在问题。
您还可以卸载conda软件包
conda remove flask
conda remove werkzeug
$ c
$ b 然后只需要安装这两个pb
pre $ pip install flask
pip install werkzeug
使用conda 3.4.2
I'm working in a standard development environment with Flask and am having trouble getting the debug to work.
Just using the standard Hello World, with an error like so:
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
err
return "Hello World!"
if __name__ == "__main__":
app.run(debug=True)
My application breaks, but there is no dynamic debugging and I get the following error message:
If you enable JavaScript you can also use additional features such as code
execution (if the evalex feature is enabled), automatic pasting of the
exceptions and much more.
I have JavaScript enabled, and don't know why I'm receiving this error. Any ideas?
EDIT
I found this similar post here. It appears that Flask can't find a few files.
127.0.0.1 - - [23/Feb/2014 22:04:37] "GET /?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 404 -
I am using Anaconda and have removed and reinstalled both Flask and Werzeug, but am still having the issue.
You can also uninstall the conda packages
conda remove flask
conda remove werkzeug
Then just pip install both of those
pip install flask
pip install werkzeug
That worked for me using conda 3.4.2
这篇关于烧瓶调试不能在Anaconda下工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!