I am getting this Traceback (most recent call last) when running my python-flask web app.
**Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/flask/cli.py", line 325, in __call__
self._flush_bg_loading_exception()
File "/Library/Python/2.7/site-packages/flask/cli.py", line 313, in _flush_bg_loading_exception
reraise(*exc_info)
File "/Library/Python/2.7/site-packages/flask/cli.py", line 302, in _load_app
self._load_unlocked()
File "/Library/Python/2.7/site-packages/flask/cli.py", line 317, in _load_unlocked
self._app = rv = self.loader()
File "/Library/Python/2.7/site-packages/flask/cli.py", line 372, in load_app
app = locate_app(self, import_name, name)
File "/Library/Python/2.7/site-packages/flask/cli.py", line 246, in locate_app
'Could not import "{name}".'.format(name=module_name)
NoAppException: Could not import "teosblog.py
flask run
python teosblog".**
from flask import Flask app = Flask(name)
@app.route("/") def hello(): return "
Hello World!
"
I am running the server on the terminal with: "cd Flask_Blog", "export FLASK_DEBUG=1"
this than runs the server and gives me the ip to run on my WebBrowser, but I have no success whatsoever! Instead i get the above error.
I have also trying initializing the flask module by assigning the "flask.init()" code, but I still get the error on the web Browser!
am i doing something wrong? Can i get some assistances? thanks
Ps: I also tried using the python interpreter to run my app by adding the following to my code:
if name == 'main': app.run(debug=True)
but I still get the trace back.