SQLObject connection/transaction blowing up

J

jacob.miles

I'm trying to connect to a mysql database, with autoCommit and caching
off, and I'm trying to create a transaction. Why does this blow up?
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File
"/usr/local/lib/python2.4/site-packages/SQLObject-0.7.0-py2.4.egg/sqlobject/dbconnection.py",
line 354, in transaction
return Transaction(self)
File
"/usr/local/lib/python2.4/site-packages/SQLObject-0.7.0-py2.4.egg/sqlobject/dbconnection.py",
line 722, in __init__
self._connection = dbConnection.getConnection()
File
"/usr/local/lib/python2.4/site-packages/SQLObject-0.7.0-py2.4.egg/sqlobject/dbconnection.py",
line 226, in getConnection
conn = self.makeConnection()
File
"/usr/local/lib/python2.4/site-packages/SQLObject-0.7.0-py2.4.egg/sqlobject/mysql/mysqlconnection.py",
line 49, in makeConnection
conn.autocommit(self.autoCommit)
TypeError: an integer is required
 
?

=?ISO-8859-1?Q?paul_k=F6lle?=

I'm trying to connect to a mysql database, with autoCommit and caching
off, and I'm trying to create a transaction. Why does this blow up?
As the traceback is telling you, your connectionString is missing the
actual values. Not sure about the cache parameter but:
connectionString =
'mysql://admin@localhost/mc_image_library_dev?autoCommit=1' should work.

cheers
Paul
[snipp]
conn.autocommit(self.autoCommit)
TypeError: an integer is required
 
J

jacob.miles

No - I want autoCommit to be false. It defaults to true. SQLObject's
documentation says to leave the value blank for false, and to specify
any non-blank value for true.

Is the SQLObject documentation wrong? Should I specify autoCommit=0?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top