[DB-SIG] DCOracle2 excepting after execute

Kancianic, Jennifer C. (JKANCIAN) JKANCIAN at arinc.com
Wed Jun 11 20:39:23 EDT 2003


Sometimes, when our code executes an update or insert statement, DCOracle2
will except unexpectedly.  Here is the traceback from our logfile:

Traceback (most recent call last):
  File "/home/adc/adc/lib/UserDB.py", line 414, in updateLastAccessed
    results = self.db.doSQL(sql, (key, ))
  File "/home/adc/adc/lib/OracleDB.py", line 111, in doSQL
    self.cursor.execute(sqlStatement, list)
  File "/usr/local/lib/python2.2/site-packages/DCOracle2/DCOracle2.py", line
1008, in execute
    self.rowcount = self._cursor.rowcount()
AttributeError: 'NoneType' object has no attribute 'rowcount'

This appears to be occurring in the DCOracle2 code that tries to get the
number of rows affected after the execution.

        result = self._cursor.execute()
        if result in RowCountResults:
            self.rowcount = self._cursor.rowcount()
        else:
            self.rowcount = -1

Has anyone encountered this?  What can I do anything to NOT get the
exception?  This is happening regularly and is not good.

If this was designed this way, how should I deal with it?  Forgive my
ignorance.

I am using Oracle 1.8, Linux Redhat 7.1, python 2.2, DCOracle 1.3 (I think).

Thanks for your help,
Jenny



More information about the DB-SIG mailing list