Re: [sqlalchemy] Querying mssql time columns

2011-10-31 Thread Simon Haines
Thanks Michael, you're correct I'm using pyodbc with FreeTDS, which doesn't recognize the time datatype (and it seems FreeTDS doesn't support anything above SQLServer 2005). And you're right, this is not a SQLAlchemy issue. Sorry about that. I guess I can work around this by using

[sqlalchemy] Debugging 'StatementError: Can't reconnect until invalid transaction is rolled back' error

2011-10-31 Thread Benjamin Sims
Hi all, I'm seeing this error intermittently in my application since switching to MySQL - it occurs on several different pages and I can't track down why: StatementError: Can't reconnect until invalid transaction is rolled back (original cause: InvalidRequestError: Can't reconnect until invalid

Re: [sqlalchemy] Debugging 'StatementError: Can't reconnect until invalid transaction is rolled back' error

2011-10-31 Thread Michael Bayer
On Oct 31, 2011, at 8:45 AM, Benjamin Sims wrote: Hi all, I'm seeing this error intermittently in my application since switching to MySQL - it occurs on several different pages and I can't track down why: StatementError: Can't reconnect until invalid transaction is rolled back

Re: [sqlalchemy] Problem/bug with column_property on eagerloaded polymophic table

2011-10-31 Thread Adrian Tejn Kern
Thank you, very much. I actually did try to use the actually Column, but I could figure out how to resolve my interdependencies since my column_property is actually a subselect, and apparently I didn't test it on my test case. -- You received this message because you are subscribed to the

Re: [sqlalchemy] Debugging 'StatementError: Can't reconnect until invalid transaction is rolled back' error

2011-10-31 Thread Benjamin Sims
I suspect that my understanding of both threading and Sessions is going to be found pretty wanting here; I've basically just lifted things from Pyramid/SQLAlchemy examples. My understanding is that the framework handles threading, and that based on examples and

Re: [sqlalchemy] Debugging 'StatementError: Can't reconnect until invalid transaction is rolled back' error

2011-10-31 Thread Michael Bayer
On Oct 31, 2011, at 12:56 PM, Benjamin Sims wrote: I suspect that my understanding of both threading and Sessions is going to be found pretty wanting here; I've basically just lifted things from Pyramid/SQLAlchemy examples. My understanding is that the framework handles threading, and

[sqlalchemy] Re: Setup to best support multi-threads

2011-10-31 Thread Paul
I'm getting the error sqlalchemy.exc.ProgrammingError: (ProgrammingError) SQLite objects created in a thread can only be used in that same thread.The object was created in thread id 5808 and this is thread id 7936 None None with my current setup, I'm not sure what I've done wrong. I set up

Re: [sqlalchemy] Re: Setup to best support multi-threads

2011-10-31 Thread Michael Bayer
a little programming puzzle.The scoped_session() is a thread local registry which links a Session to the current thread. When you say self.session = Session(), you're invoking the registry, generating a Session local to the current thread, then assigning it to a local variable.In fact