[sqlalchemy] Error trying to use session.execute

2010-06-12 Thread Faheem Mitha
Hi, While rearranging some Python code using SQLAlchemy, I managed to get this puzzling error. The oddest bit is that using conn.execute works, while session.connect doesn't. Below, the code that doesn't work, the code that works, and last, the traceback for the code that doesn't work. If

Re: [sqlalchemy] Error trying to use session.execute

2010-06-12 Thread Michael Bayer
this pattern: try: foo() except: pass will get you killed every time. the difference in result is between the session's default of transactionalized execution and the Connection's default of autocommit execution. On Jun 12, 2010, at 3:30 PM, Faheem Mitha wrote: Hi, While