In my server code, there is a call to _SO_fetchAlternateID (nested in some value call) that ultimately calls makeConnection in pgconnection.py .
This call fails with conn.autocommit(1) , with an error
TypeError: 'bool' object cannot be called
Here is the SQLObject code (0.8.7):
def makeConnection(self): try: if self.use_dsn: conn = self.module.connect(self.dsn) else: conn = self.module.connect(**self.dsn_dict) except self.module.OperationalError, e: raise self.module.OperationalError("%s; used connection string %r" % (e, self.dsn)) if self.autoCommit:
Debugging shows that conn does indeed contain a connection object, but autocommit is not a method, but instead logical (False).
self.module is the self.module module (2.4.2).
Is this a configuration problem? incompatible versions?
UPDATE:
The reason is the incompatibility problem in psycopg2-2.4.2. Looking at the source code for C, psycopg / connection.h has an integer variable, unfortunately called autocommit . Version 2-2.4 is working fine.
Ovesh source share