Quick question.

I'm trying to make one of my classes persistent. The class itself has only simple attributes of general types like int,string,timestamp, no lists etc. It seems to work just fine without subclassing Persistent, but causes an error when I do. Do I always need to subclass persistent?

There error i receive seems to have a problem with my __eq__ method.

Here's the error I get when I do subclass persistent:

.......No handlers could be found for logger "ZODB.Connection"
ERROR: testPersistence (__main__.ToolDataTests)
Traceback (most recent call last):
  File "", line 1412, in testPersistence
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/", line 332, in failUnlessEqual
    if not first == second:
  File "", line 1278, in __eq__
        !!!!Below is where it's choking on my __eq__ method!!!
return == and self.value == other.value and mx.DateTime.cmp(self.timeStamp,other.timeStamp,Globals.AvgTimePrec)==0 and self.slowData == other.slowData File "/Library/Python/2.5/site-packages/ZODB3-3.7.2-py2.5- macosx-10.5-i386.egg/ZODB/", line 758, in setstate
    raise ConnectionStateError(msg)
ConnectionStateError: Shouldn't load state for 0x01 when the connection is closed

Ran 8 tests in 0.043s

FAILED (errors=1)

Thanks for the help!

Kenneth Miller

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -

Reply via email to