Unexpected exception thrown in __del__

Charles Hixson charleshixsn at earthlink.net
Mon May 21 11:29:28 EDT 2012


message excerpt:
flush: sql =  insert or replace into persists (id, name, data, rdCnt, 
rdTim, wrCnt, wrTim, deprecation) values (?, ?, ?, ?, ?, ?, ?, ?)
Exception TypeError: "'NoneType' object is not callable" in <bound 
method Shelve2.__del__ of <__main__.Shelve2 object at 0x7ff4c0513f90>> 
ignored

flush is being called from within __del__.  I've narrowed it down to:
         print ("flush: sql = ", sql)
         curTim    =    nowI()
         print ("flush: curTim = ", curTim)

nowI() is a function defined at the top of the file, and before the 
class, thus:
def    nowI():
     t    =    int (time() * 100)
     return    t

All I can guess is that there's some reason that an external to the 
class function shouldn't be called during a __del__.  Is this correct?

-- 
Charles Hixson




More information about the Python-list mailing list