It took me all day, but I finally managed to figure out how to do what you suggested. Unfortunately, I still get the very same error: POSKeyError, Error Value: 0x01edf2 . Just to make sure I did it right, 0x01edf2 is the OID I should use in your solution, right?
-Tim On 3/29/07, Tim Tisdall <[EMAIL PROTECTED]> wrote:
Okay... I've managed to create a persistent object called 'p' with the OID of the missing object. I have no idea how to determine the database connection object to pass it to the ZODB.Connection.Connection.add() . -Tim On 3/27/07, Dieter Maurer <[EMAIL PROTECTED]> wrote: > Tim Tisdall wrote at 2007-3-27 14:59 -0400: > > When I try to access any part of the plone instance I'm given the > >same exceptions I mentioned before. I can't seem to access any > >subobjects. Am I doomed? > > You mean a "POSKeyError"? > > Then, you are not (yet) completely doomed. You can try the following: > > You create a persistent object, assign it the missing oid as > "_p_oid" (you can use the "ZODB.utils.p64" to convert an integer > to the required 8 byte binary representation) and > then you emulate a call to "ZODB.Connection.Connection.add" for > your object (of course without the "assert obj._p_oid is None" > and the "obj._p_pid = self._storage.new_oid()"). > Then you commit the transaction. > > This should create an object with the missing oid (of course, not > the correct one). If you are lucky, your object will be loadable > after this operation. > > > > -- > Dieter >
_______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev