exception on rollback if no transaction begun, threadlocal engine

Issue #1998 resolved
Mike Bayer repo owner created an issue
from sqlalchemy import *

engine = create_engine('sqlite:///s.db', strategy='threadlocal', echo=True)
engine.rollback()

Comments (4)

  1. Former user Account Deleted
    • changed status to open
    • removed status

    Hi Michael, thanks for looking at this. I've downloaded the lastest package from http://hg.sqlalchemy.org/sqlalchemy/archive/rel_0_6.tar.gz as you mentioned in http://groups.google.com/group/sqlalchemy/browse_thread/thread/921836e8961e7003

    but the error persists.

    engine = create_engine('sqlite:///s.db', strategy='threadlocal', echo=True) engine.rollback() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/site-packages/SQLAlchemy-0.6.6dev-py2.7.egg/sqlalchemy/engine/threadlocal.py", line 86, in rollback if not self._connections.trans: AttributeError: 'thread._local' object has no attribute 'trans'

    Ralph

  2. Log in to comment