[sqlalchemy] already has a primary mapper defined error occurs occasionally

2012-01-10 Thread Josh Ha-Nyung Chung
I'm running web service using sqlalchemy with apache + wsgi + pyramid framework. I've initialize metadata like the following: Base = declarative_base() Base.metadata.reflect(bind=my_engine) user_table = DP_Base.metadata.tables[user] mapper(User, user_table) and I'm using scoped session since

Re: [sqlalchemy] already has a primary mapper defined error occurs occasionally

2012-01-10 Thread Josh Ha-Nyung Chung
-Nyung Chung minorbl...@gmail.com On Wednesday, January 11, 2012 at 1:48 AM, Michael Bayer wrote: On Jan 10, 2012, at 11:38 AM, Josh Ha-Nyung Chung wrote: I'm running web service using sqlalchemy with apache + wsgi + pyramid framework. I've initialize metadata like the following: Base

[sqlalchemy] InvalidRequestError: Can't reconnect until invalid transaction is rolled back error during SELECT query

2011-12-28 Thread Josh Ha-Nyung Chung
I've made web application using Pyramid 1.2.5 + Python 2.7.1 + SQLAlchemy 0.7.4 and occasionally encountered the following error. Traceback (most recent call last): File /usr/local/lib/python2.7/site-packages/pyramid/router.py, line 176, in __call__ response = self.handle_request(request)