These lines seem to be the cause of the error (i.e. the app works when I comment them out, but I get the error below when they are uncommented). This works fine on my local machine, is there something I need to do differently on PA? Please feel free to look at my files if it helps diagnose.
path = '/tmp/app_session'
if not os.path.exists(path):
os.mkdir(path)
os.chmod(path, int('700', 8))
app.session_interface = SqliteSessionInterface(path)
LOG:
2015-05-19 22:28:16,368 :/usr/lib/python2.7/threading.py:1160: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
2015-05-19 22:28:16,369 : return _active[_get_ident()]
2015-05-19 22:28:16,369 :Traceback (most recent call last):
2015-05-19 22:28:16,369 : File "/bin/user_wsgi_wrapper.py", line 130, in __call__
2015-05-19 22:28:16,369 : self.error_log_file.logger.exception("Error running WSGI application")
2015-05-19 22:28:16,369 : File "/usr/lib/python2.7/logging/__init__.py", line 1185, in exception
2015-05-19 22:28:16,369 : self.error(msg, *args, **kwargs)
2015-05-19 22:28:16,370 : File "/usr/lib/python2.7/logging/__init__.py", line 1178, in error
2015-05-19 22:28:16,370 : self._log(ERROR, msg, args, **kwargs)
2015-05-19 22:28:16,370 : File "/usr/lib/python2.7/logging/__init__.py", line 1270, in _log
2015-05-19 22:28:16,370 : record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra)
2015-05-19 22:28:16,371 : File "/usr/lib/python2.7/logging/__init__.py", line 1244, in makeRecord
2015-05-19 22:28:16,371 : rv = LogRecord(name, level, fn, lno, msg, args, exc_info, func)
2015-05-19 22:28:16,371 : File "/usr/lib/python2.7/logging/__init__.py", line 284, in __init__
2015-05-19 22:28:16,371 : self.threadName = threading.current_thread().name
2015-05-19 22:28:16,371 : File "/usr/lib/python2.7/threading.py", line 1160, in currentThread
2015-05-19 22:28:16,372 : return _active[_get_ident()]
2015-05-19 22:28:16,372 : File "/bin/user_wsgi_wrapper.py", line 122, in __call__
2015-05-19 22:28:16,372 : app_iterator = self.app(environ, start_response)
2015-05-19 22:28:16,372 : File "/home/mritchie712/.local/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
2015-05-19 22:28:16,376 : return self.wsgi_app(environ, start_response)
2015-05-19 22:28:16,377 : File "/home/mritchie712/.local/lib/python2.7/site-packages/flask/app.py", line 1813, in wsgi_app
2015-05-19 22:28:16,378 : ctx.push()
2015-05-19 22:28:16,378 : File "/home/mritchie712/.local/lib/python2.7/site-packages/flask/ctx.py", line 321, in push
2015-05-19 22:28:16,379 : self.session = self.app.open_session(self.request)
2015-05-19 22:28:16,379 : File "/home/mritchie712/.local/lib/python2.7/site-packages/flask/app.py", line 825, in open_session
2015-05-19 22:28:16,380 : return self.session_interface.open_session(self, request)
2015-05-19 22:28:16,380 : File "/home/mritchie712/gatherMVP/sqliteSession.py", line 124, in open_session
2015-05-19 22:28:16,381 : rv = SqliteSession(self.directory, sid)
2015-05-19 22:28:16,381 : File "/home/mritchie712/gatherMVP/sqliteSession.py", line 30, in __init__
2015-05-19 22:28:16,382 : with self._get_conn() as conn:
2015-05-19 22:28:16,382 : File "/home/mritchie712/gatherMVP/sqliteSession.py", line 70, in _get_conn
2015-05-19 22:28:16,383 : self.conn = sqlite3.Connection(self.path)
2015-05-19 22:28:16,383 :sqlite3.OperationalError: unable to open database file
[ edited by admin: formatting ]