As I said in a former post, this can be done from a running zope with a mere python script. Nothing involved that needs an external script or something as esoteric like accessing zope from a python prompt.. All you need to know is the id of the broken object which you (probably) can find by something like: folder = getattr(context, "theFolder") brokenObjs = folder.objectItems('broken') ... If objectItems does not let you ask for 'broken' you can at least list the ids, and make an intelligent guess which one it is. Robert ----- Original Message ----- From: "Paul Winkler" <pw_lists@slinkp.com> To: <zope@zope.org> Sent: Thursday, August 22, 2002 8:51 AM Subject: Re: [Zope] POSKeyError ... uh-oh
Well, I did manage to get in there by using the python interactive prompt to examine my Data.fs. With *much* help from runyaga on #plone, I was eventually able to do something like:
import Zope app = Zope.app() app.path.to.my.folder.manage_delObjects(['broken_object_id']) get_transaction().commit()
... and presto, no more of that pesky broken object, and I can now start zope and access its parent folder normally.
Could probably have done the same thing from an external method, but the interactive interpreter is great for exploring.
It's lucky for me that the broken object was a folder called "Test" with nothing useful in it. I also kept a copy of the Data.fs with the broken object, so I can examine it later and try to see what the hell happened. So far the logs aren't helpful, except to pinpoint the first failed access of the object.
--PW
--
Paul Winkler "Welcome to Muppet Labs, where the future is made - today!"
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )