SQLObject connection/transaction blowing up
jacob.miles at gmail.com
jacob.miles at gmail.com
Sat Jan 14 16:31:01 EST 2006
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?
>>> from sqlobject import *
>>> connectionString = 'mysql://admin@localhost/mc_image_library_dev?cache=&autoCommit='
>>> connection = connectionForURI (connectionString)
>>> sqlhub.processConnection = connection
>>> oldConn = sqlhub.getConnection()
>>> trans = oldConn.transaction()
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
More information about the Python-list
mailing list