/usr/lib/python2.7/ RuntimeWarning:

I am getting the following error:

2014-04-16 01:55:00,044 :/usr/lib/python2.7/ RuntimeWarning: tp_compare didn't return -1 or -2 for exception 2014-04-16 01:55:00,045 : return _active[_get_ident()] 2014-04-16 01:55:00,043 :Error running WSGI application None

NicholasMurray got the same error in the following:

I am using Flask and 2.7 python. If it is a timezone issue, I have no idea how I would adjust that if I am seeing the same problem.

I found that I had not defined a session variable before using it. I defined it and the problem went away.

Thanks for letting us know. Are you still getting the tp_compare error, BTW? I can see how your change would clear up the second one, the Error running WSGI application None, but the first is a little more confusing.

All the errors went away

That's a little odd. A good thing, but definitely odd. Still, if it's working with no errors now then I guess we don't need to worry.

What do you mean a session variable? Can you please provide more detailes on how you fixed it?


I had the same issue, turns out I was calling an environmental variable in my settings file that didn't exist (os.environ['SECRET_KEY'])