I saw this on the Trunk in January, so it pre-dates the release of
0.9, but comes much later than 0.8. I also had a similar problem on
Linux, which was resolved by updating SQLite to version 3.
--
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog
That makes it sound like the bugs were the same, and I don't think
they were. But I thought I'd point out that there is the (slim but
real) possibility of that there could be a platform specific problem
in SQLite...
I'm seeing it on Linux too.
TurboGears 0.9a4
SQLObject 0.7.1dev-r1588
pysqlite-2.1.3
sqlite 3.3.3
And this is the model I used (but maybe it's not a good model)
from sqlobject import *
from turbogears.database import PackageHub
# Uncomment the following line if you wish to use Identity and
SO_Provider
from turbogears.identity.soprovider import TG_User, TG_Group,
TG_Permission
hub = PackageHub("godot2")
__connection__ = hub
# class YourDataClass(SQLObject):
# pass
class Term(SQLObject):
term = StringCol(length=400,notNone=True)
definition = StringCol()
context = StringCol()
finalresult = StringCol(length=400)
status =
EnumCol(enumValues=['NEW','CONFIRMED','ATTENTION','FINISHED'])
created = DateTimeCol()
changed = DateTimeCol()
comments = MultipleJoin("Comment")
suggestions = MultipleJoin("Suggestion")
class Comment(SQLObject):
comment = StringCol(notNone=True)
created = DateTimeCol()
changed = StringCol()
term = ForeignKey("Term")
class Suggestion(SQLObject):
suggestion = StringCol(length=400,notNone=True)
points = IntCol()
created = DateTimeCol()
changed = DateTimeCol()
term = ForeignKey("Term")
class Veto(SQLObject):
suggestion = ForeignKey("Suggestion")
comment = ForeignKey("Comment")
user = ForeignKey("User")
If we are talkin about this error:
godot2$ tg-admin sql create
Using database URI sqlite:///tmp/godot2.db
Exception exceptions.AttributeError: "'pysqlite2.dbapi2.Connection'
object has no attribute 'autocommit'" in <bound method
Transaction.__del__ of <sqlobject.dbconnection.Transaction object at
0xa73be8cc>> ignored
I'm seeing it on Linux too.
TurboGears 0.9a4
SQLObject 0.7.1dev-r1588
pysqlite-2.1.3
sqlite 3.3.3
I've debugged this and identified the part of SQLObject that's creating
problems here - and put a comment in the ticket:
http://trac.turbogears.org/turbogears/ticket/763
-- Gerhard
sqlobject.dburi="notrans_sqlite:///Users/ienliven/Sites/frs-py/frs-sqlobject.db"
cheers,
andre souza