[ZODB-Dev] POSKeyError
Dieter Maurer
dieter at handshake.de
Fri Oct 8 14:11:08 EDT 2004
Bob Horvath wrote at 2004-10-7 23:59 -0500:
> ...
>As I understand it, POSKeyErrors are either objects that have no path from the
>root, or objects that refer to other objects that don't exist.
Objects in the ZODB are identified by so called "oid"s (Object Ids).
When you try to load an object identified by an oid and
there is no such object, you get a "POSKeyError".
Persistent references (to objects) are essentially such an "oid".
As you do not try to load objects given an arbitrary oid, but
only "oid"s that come from persistent references,
you usually get a "POSKeyError" when an object contains
a dangling persistent reference -- a reference to an object which
does not exist in the ZODB.
>For the first case, deleting them seems to be harmless, but for the second, if
>you have a folder of things one of which doesn't exist, deleting the folder
>seems more destructive than necessary. Wouldn't it be better to delete the
>reference to the item?
There is a HowTo how to resolve such a situation.
>
--
Dieter
More information about the ZODB-Dev
mailing list