[sqlalchemy] AttributeError: 'Session' object has no attribute '_model_changes'

2013-10-22 Thread Yang Zhang
Specifically, the code path where this is appearing ends up looking like: session = sqlalchemy.orm.Session(sqlalchemy.create_engine('sqlite:///')) session.execute('run_some_transaction()') session.commit() This raises: AttributeError: 'Session' object has no attribute '_model_changes' I get

[sqlalchemy] Re: AttributeError: 'Session' object has no attribute '_model_changes'

2013-10-22 Thread Yang Zhang
Sorry, disregard—wrong mailing list! This is Flask-SQLAlchemy-specific. On Mon, Oct 21, 2013 at 11:51 PM, Yang Zhang yanghates...@gmail.com wrote: Specifically, the code path where this is appearing ends up looking like: session = sqlalchemy.orm.Session(sqlalchemy.create_engine('sqlite:///'))

Re: [sqlalchemy] quelified/disambiguated column names in query

2013-10-22 Thread lars van Gemerden
Thank you, i must have blundered over that in the docs ... Lars On Mon, Oct 21, 2013 at 11:36 PM, Michael Bayer mike...@zzzcomputing.comwrote: On Oct 21, 2013, at 5:20 PM, lars van gemerden l...@rational-it.com wrote: Hello, Say that i have a table with reports with a column 'title'

Re: [sqlalchemy] Occasional InvalidRequestError: Table 'xxx' is already defined for this MetaData instance.

2013-10-22 Thread Joseph Casale
Hi Michael, idm_rw.py is simply a class that is fed stdin and processes and returns the input via stdout. The sqlalchemy imports at the top are leveraged within the classes init method for configuration queries. There are two plugins like this, each one is invoked in a fresh process and loads the

Re: [sqlalchemy] Occasional InvalidRequestError: Table 'xxx' is already defined for this MetaData instance.

2013-10-22 Thread Michael Bayer
well it's either that module is being run twice within one process somehow, or you have that table name repeated somewhere else. its one of those two things or some variant thereof. you might want to put some logging into that module to see if this is happening. On Oct 22, 2013, at 11:19

[sqlalchemy] Receiving sqlalchemy.exc.InvalidRequestError: Table 'xxx' is already defined for this MetaData instance.

2013-10-22 Thread Joseph Casale
I have a module I wrote that seems to emit this error during import of some of its table classes when concurrency gets high. The application that uses this module fires up an interpreter session for each Python script that leverages the import. When not under load or importing manually at the