I've uploaded a Flask application and created a MySQLdb, I have my virtual environment set and can see the app.url_map when I look at the Flask application from the console. Still, I'm receiving the following error message in the log:
2015-06-29 03:26:47,513 :/usr/lib/python2.7/threading.py:1160: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
2015-06-29 03:26:47,514 : return _active[_get_ident()]
2015-06-29 03:26:47,511 :Error running WSGI application
None
I've been searching the forums for an answer to these cryptic log messages and I've come to believe the error is either 1) my environment variables are not correctly specified; 2) I don't have enough workers on the application. I doubt it's number 2. However, I believe I have my wsgi file set properly:
import os
import sys
os.environ['SECRET_KEY'] = 'my_precious'
os.environ['SQLALCHEMY_DATABASE_URI'] = 'mysql://wsankey:PASSWORD@mysql.server/wsankey$default'
os.environ['DEBUG'] = 'False'
os.environ['DEBUG_TB_ENABLED'] = 'False'
os.environ['STRIPE_SECRET_KEY'] = 'foo'
os.environ['STRIPE_PUBLISHABLE_KEY'] = 'bar'
#
path = '/home/wsankey/ppc_flask/'
if path not in sys.path:
sys.path.append(path)
#
from project import app as application
#application.config.from_object(os.environ['APP_SETTINGS'])
#basedir = os.path.abspath(os.path.dirname(__file__))
I'm currently at a loss for what to do. I can see the database in the console and interact with it (create the database, migrate it) with commands in my manage.py file. I've also removed the app.run() command from that manage.py file.
Any thoughts or recommendations? Maybe I'm setting my environment variables incorrectly?