Re: Unable to fix a POSKeyError
"Ben Lobo" <[email protected]> Mon, 21 May 2007 13:09:06 +0100
| Newsgroups | gmane.comp.web.zope.database |
|---|---|
| Message-ID | <[email protected]> |
"Dieter Maurer" <[email protected]> wrote in message news:[email protected]... > Ben Lobo wrote at 2007-5-18 17:33 +0100: > > ... > >I'm getting a POSKeyError when I try to access a particular file in a Plone > >site within the ZMI (see error report at > >http://hobointernet.com/POSKeyError.htm). > > You replace this file by a new object using an interative Python interpreter: > > container._setOb(idOfBrokenObject, someNewObject) > > After that, you can delete the broken object > > container._delObject(idOfBrokenObject) > > and commit. > > -- > Dieter Thanks Dieter. I wasn't too sure how to go about doing this as I'm running Plone on Windows so I don't think zopectl works (which I believe is what would normally be used in this situation on linux). So for anyone else with the same problem in the future, I downloaded PloneShell - http://plone.org/products/ploneshell - and then used Dieter's suggestions above and then committed the changes with: get_transaction().commit() Cheers Ben