[ZODB-Dev] KeyError on OIBTree after export import

Bernd Dorn bernd.dorn at lovelysystems.com
Wed Mar 14 06:39:11 EDT 2007

hi all

i have some very odd problem

i use the ExportImport module to export an object with a btree (its a  
zope3 intid utility)

the import export works just fine

but after the import in the .ids attribute of the util (which is an  
OIBtree) raises a KeyError for an existing key

so if i do

 >>> key in sorted(self.ids)
 >>> self.ids[key]
KeyError ...

# the hashes are the same
 >>> hash([k for k in self.ids where k == key][0]) == hash(key)

can anyone tell me what is wrong here, i guess it has something to do  
with the __new__ and __setstate__ methods of the OIBTree class

thx in advance, Bernd

More information about the ZODB-Dev mailing list