#763: exceptions.AttributeError: "'pysqlite2.dbapi2.Connection' object has no
attribute 'autocommit'"
---------------------------------------+------------------------------------
 Reporter:  [EMAIL PROTECTED]     |        Owner:  anonymous
     Type:  defect                     |       Status:  new      
 Priority:  high                       |    Milestone:  0.9a5    
Component:  SQLObject                  |      Version:  0.9a4    
 Severity:  normal                     |   Resolution:           
 Keywords:  pysqlite sqlite SQLObject  |  
---------------------------------------+------------------------------------
Comment (by ghaering):

 Somebody please forward this to the SQLObject people:

 This happens because in SQLObject's sqlite/dbconnection.py in the method
 _setAutoCommit() the check "if using_sqlite2" fails even though this
 global variable
 '''should be''' set at this point. But for some reason, it isn't, so the
 code path that was intended for pysqlite 1.x is executed against a
 pysqlite 2.x Connection object and fails.

 I believe it does happen when there is an error during model creation, and
 SQLObject tries to roll back. Minimal model to reproduce:

 {{{
 #!python
 from sqlobject import *
 from turbogears.database import PackageHub

 hub = PackageHub("test")
 __connection__ = hub

 class Foo(SQLObject):
     bar = MultipleJoin("Bar")
 }}}

-- 
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/763>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Tickets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---

Reply via email to