Hello!
I modified heavily the app im working on, to avoid "Sql has goen away" exception, but the situation got worse. I update PYTHONPATH to the new path, and updated the working directory on website configuration page The present organization of the files is as follows:
/home/fabioquintilii
/app
runserver.py
/app
/static
/templates
__init.py__ <=== empty
app.py
config.py
models.py
views.py
When I run the app I get this error:
2016-08-28 21:56:34 Traceback (most recent call last):
2016-08-28 21:56:34 File "/bin/user_wsgi_wrapper.py", line 154, in __call__
2016-08-28 21:56:34
2016-08-28 21:56:34 app_iterator = self.app(environ, start_response)
2016-08-28 21:56:34 File "/bin/user_wsgi_wrapper.py", line 170, in import_error_application
2016-08-28 21:56:34
2016-08-28 21:56:34 raise e
2016-08-28 21:56:34 NameError
2016-08-28 21:56:34 :
2016-08-28 21:56:34 name 'app' is not defined
app.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
file wsgi
# This file contains the WSGI configuration required to serve up your
# web application at http://<your-username>.pythonanywhere.com/
# It works by setting the variable 'application' to a WSGI handler of some
# description.
#
# The below has been auto-generated for your Flask project
import sys
# add your project directory to the sys.path
project_home = u'/home/fabioquintilii/app/app'
if project_home not in sys.path:
sys.path = [project_home] + sys.path
# import flask app but need to call it "application" for WSGI to work
#from flask_app import app as application
from app import app as application
It seems that the server points to another directory, but I cannot understand how to fix it. Can You help me, please?
Regards
Fabio