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.
The above comment by dirn Feb 24 at 3:35 is correct. However, with anaconda, uninstalling and reinstalling packages does not help. Here is a hack that got mine to work...
The
werkzeug/debug
directory on my anaconda installation is missing a directory calledshared
. I have a non-anaconda installation of flask (using macports in my case). I simply copied that directory from my macports installation to the anaconda installation. The command for this with full path names that I used for myflasky
conda virtual environment was:You need to do this separately for each conda virtual environment. Your path names may vary. Also, you should probably ensure that the non-anaconda installation is the same version of werkzeug.
You can also uninstall the conda packages
Then just pip install both of those
That worked for me using conda 3.4.2