Hi my webapp is running fine in local machine , but at python anywhere I am facing the following error :
2015-09-07 08:36:28,126 :/usr/lib/python2.7/threading.py:1160: RuntimeWarning: tp_compare didn't return -1 or -2 for exception 2015-09-07 08:36:28,126 : return _active[_get_ident()] 2015-09-07 08:36:28,123 :Error running WSGI application
I am using a virtual environment , I am reading a config file in the flak_app.py as follows, is this causing the problem?
import sys
config = configparser.ConfigParser()
config.read('path to config file/config.INI')
path = config['DEFAULT']['path']
print path
isLocal = config['option']['isLocal']
if isLocal == 'False':
isLocal = False
else:
isLocal = True
print isLocal
app = Flask(__name__)
if not isLocal:
sys.path.append('/home/codeashu/Recom/')
import ImportMain as rmain
try:
from flask.ext.cors import CORS # The typical way to import flask-cors
except ImportError:
# Path hack allows examples to be run without installation.
import os
parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
os.sys.path.insert(0, parentdir)
from flask.ext.cors import CORS
cors = CORS(app)
[edit by admin: formatting]