POSKeyError ... uh-oh
A big chunk of my dev server has apparently just vanished. When I click on the folder in question, I get the following. Have I hosed my ZODB somehow? This is bizarre. I swear I didn't do anything to or in that folder anytime recently, and a search through Undo tab in the parent folder confirms that. I'm running zope 2.5.1, python 2.1.3 on linux. Haven't seen anything like this before, and searching lists.zope.org doesn't turn up anything helpful. Restarting zope doesn't magically fix it... ------------------- Zope Error Zope has encountered an error while publishing this resource. Error Type: POSKeyError Error Value: 000000000001a81b Troubleshooting Suggestions * The URL may be incorrect. * The parameters passed to this resource may be incorrect. * A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. Powered by Zope Traceback (innermost last): File /zope/temp/Zope-2.5.1-src/lib/python/ZPublisher/Publish.py, line 150, in publish_module File /zope/temp/Zope-2.5.1-src/lib/python/ZPublisher/Publish.py, line 114, in publish File /zope/temp/Zope-2.5.1-src/lib/python/Zope/__init__.py, line 159, in zpublisher_exception_hook (Object: PatientPortal) File /zope/temp/Zope-2.5.1-src/lib/python/ZPublisher/Publish.py, line 98, in publish File /zope/temp/Zope-2.5.1-src/lib/python/ZPublisher/mapply.py, line 88, in mapply (Object: manage_main) File /zope/temp/Zope-2.5.1-src/lib/python/ZPublisher/Publish.py, line 39, in call_object (Object: manage_main) File /zope/temp/Zope-2.5.1-src/lib/python/Shared/DC/Scripts/Bindings.py, line 252, in __call__ (Object: manage_main) File /zope/temp/Zope-2.5.1-src/lib/python/Shared/DC/Scripts/Bindings.py, line 283, in _bindAndExec (Object: manage_main) File /zope/temp/Zope-2.5.1-src/lib/python/App/special_dtml.py, line 172, in _exec (Object: manage_main) File /zope/temp/Zope-2.5.1-src/lib/python/DocumentTemplate/DT_In.py, line 637, in renderwob (Object: objectItems) File /zope/temp/Zope-2.5.1-src/lib/python/DocumentTemplate/DT_In.py, line 763, in sort_sequence (Object: objectItems) File /zope/temp/Zope-2.5.1-src/lib/python/ZODB/Connection.py, line 447, in setstate File /zope/temp/Zope-2.5.1-src/lib/python/ZODB/FileStorage.py, line 582, in load (Object: /zope/devzope_inst_home/var/Data.fs) File /zope/temp/Zope-2.5.1-src/lib/python/ZODB/FileStorage.py, line 577, in _load (Object: /zope/devzope_inst_home/var/Data.fs) File /zope/temp/Zope-2.5.1-src/lib/python/ZODB/FileStorage.py, line 2134, in _loadBack POSKeyError: (see above) -- Paul Winkler "Welcome to Muppet Labs, where the future is made - today!"
On Wed, Aug 21, 2002 at 08:44:34PM -0700, Paul Winkler wrote:
A big chunk of my dev server has apparently just vanished.
Wait - the folder in question still exists. But apparently some object *within* that folder is broken. Unfortunately I can't find exactly what it is, because I can't get a listing of the folder contents... By using zshell with trial and error I've narrowed down the name and have concluded that I have a buggy object named something beginning with "Test" in the folder. But how can I get rid of this bugger if I can't view the folder contents, or any other list that actually contains the nasty item? too weird... --PW Paul Winkler "Welcome to Muppet Labs, where the future is made - today!"
You can probably still access the content of the folder with folder.objectValues() So write a script to list/delete the content Robert ----- Original Message ----- From: "Paul Winkler" <pw_lists@slinkp.com> To: <zope@zope.org> Cc: "Paul Winkler" <pw_lists@slinkp.com> Sent: Thursday, August 22, 2002 6:01 AM Subject: Re: [Zope] POSKeyError ... uh-oh
On Wed, Aug 21, 2002 at 08:44:34PM -0700, Paul Winkler wrote:
A big chunk of my dev server has apparently just vanished.
Wait - the folder in question still exists. But apparently some object *within* that folder is broken. Unfortunately I can't find exactly what it is, because I can't get a listing of the folder contents...
By using zshell with trial and error I've narrowed down the name and have concluded that I have a buggy object named something beginning with "Test" in the folder.
But how can I get rid of this bugger if I can't view the folder contents, or any other list that actually contains the nasty item?
too weird...
--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 )
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!"
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 )
On Thu, Aug 22, 2002 at 09:12:59AM +0200, Robert Rottermann wrote:
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.
I'd already done more or less that by playing around in zshell. But thanks for the tips - they will probably help someone who can't / doesn't want to use the python prompt. --PW -- Paul Winkler "Welcome to Muppet Labs, where the future is made - today!"
participants (2)
-
Paul Winkler -
Robert Rottermann