Btreefolder: How to fix Keyerror ???
Hi there, I have a big problem with an Plone site throwing btreefolder errors. Traceback (innermost last): Module ZPublisher.Publish, line 113, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object Module OFS.CopySupport, line 193, in manage_pasteObjects Module OFS.ObjectManager, line 307, in _setObject Module Products.CMFCore.CMFCatalogAware, line 199, in manage_afterAdd Module Products.CMFCore.CMFCatalogAware, line 235, in __recurse Module Products.Archetypes.BaseBTreeFolder, line 37, in manage_afterAdd Module Products.Archetypes.BaseFolder, line 104, in manage_afterAdd Module Products.Archetypes.BaseObject, line 179, in manage_afterAdd - __traceback_info__: (<CartManager at /whirlweb/backup/whirlweb/portal_cartmanager>, <PloneSite at /whirlweb/backup/whirlweb>, <Folder at /whirlweb/backup>) Module Products.Archetypes.Referenceable, line 217, in manage_afterAdd Module Products.Archetypes.Referenceable, line 348, in _referenceApply Module Products.ZCatalog.Lazy, line 158, in __getitem__ Module Products.BTreeFolder2.BTreeFolder2, line 210, in _getOb KeyError: '11464251260848050376' The site runs fine for some time, then it just throws that error, and I have to restart zope. I can export the site, but not import it. Neither I can copy the site, or pack the db. I tried the checkbtrees.py script. It produces som 1200 lines some like: ['Application'].Control_Panel.Products.Formulator.Help.LabelField <persistent broken Products.Formulator.FieldHelpTopic.FieldHelpTopic instance "\x00\x00\x 00\x00\x00\x0e'r"> but most f the show somethings like: ['Application'].Control_Panel.Products.CMFTestCase.Help.catalog._catalog.__len__ <BTrees.Length.Length object at 0x40f96cac> and the final line says: total 620613 found 1299 what can I do to fix this error
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 robert rottermann wrote:
Hi there, I have a big problem with an Plone site throwing btreefolder errors.
Traceback (innermost last): Module ZPublisher.Publish, line 113, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object Module OFS.CopySupport, line 193, in manage_pasteObjects Module OFS.ObjectManager, line 307, in _setObject Module Products.CMFCore.CMFCatalogAware, line 199, in manage_afterAdd Module Products.CMFCore.CMFCatalogAware, line 235, in __recurse Module Products.Archetypes.BaseBTreeFolder, line 37, in manage_afterAdd Module Products.Archetypes.BaseFolder, line 104, in manage_afterAdd Module Products.Archetypes.BaseObject, line 179, in manage_afterAdd - __traceback_info__: (<CartManager at /whirlweb/backup/whirlweb/portal_cartmanager>, <PloneSite at /whirlweb/backup/whirlweb>, <Folder at /whirlweb/backup>) Module Products.Archetypes.Referenceable, line 217, in manage_afterAdd Module Products.Archetypes.Referenceable, line 348, in _referenceApply Module Products.ZCatalog.Lazy, line 158, in __getitem__ Module Products.BTreeFolder2.BTreeFolder2, line 210, in _getOb KeyError: '11464251260848050376'
The site runs fine for some time, then it just throws that error, and I have to restart zope.
I can export the site, but not import it. Neither I can copy the site, or pack the db.
I tried the checkbtrees.py script.
It produces som 1200 lines
some like: ['Application'].Control_Panel.Products.Formulator.Help.LabelField <persistent broken Products.Formulator.FieldHelpTopic.FieldHelpTopic instance "\x00\x00\x 00\x00\x00\x0e'r">
but most f the show somethings like: ['Application'].Control_Panel.Products.CMFTestCase.Help.catalog._catalog.__len__ <BTrees.Length.Length object at 0x40f96cac>
and the final line says: total 620613 found 1299
what can I do to fix this error
In the Control_Panel/Products folder, delete *all* disk-based products and then restart Zope: it will recreate them at startup, and should also rebuild the catalogs with the borked BTrees. Of course, back everything up first. Tres. - -- =================================================================== Tres Seaver +1 202-558-7113 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFEW0eD+gerLs4ltQ4RAh8sAKCciNApVbTWeM/H1KvU/qigG35BKwCfaD3o 8SBykcc8/gWoBojhVLTydAs= =X09r -----END PGP SIGNATURE-----
robert rottermann wrote at 2006-5-5 08:35 +0200:
... Module Products.Archetypes.BaseFolder, line 104, in manage_afterAdd Module Products.Archetypes.BaseObject, line 179, in manage_afterAdd - __traceback_info__: (<CartManager at /whirlweb/backup/whirlweb/portal_cartmanager>, <PloneSite at /whirlweb/backup/whirlweb>, <Folder at /whirlweb/backup>) Module Products.Archetypes.Referenceable, line 217, in manage_afterAdd Module Products.Archetypes.Referenceable, line 348, in _referenceApply Module Products.ZCatalog.Lazy, line 158, in __getitem__ Module Products.BTreeFolder2.BTreeFolder2, line 210, in _getOb KeyError: '11464251260848050376'
Looks as if your references were inconsistent (as always you find out by examining the code in the lines identified by your traceback). As always with inconsistencies, you have to resolve them. In your special case, there are 2 options: 1. you delete the inconsistent references 2. you add an object with id "11464251260848050376" to the references "BTreeFolder2". -- Dieter
Thanks Dieter, I stared at the solution and did not see it.. I tried a number of different things, all produced very unspecific tracebacks, just mentioning a problem with a btreefolder. Fortunately I copied a traceback that pointed to the solution. thanks again robert Dieter Maurer wrote:
robert rottermann wrote at 2006-5-5 08:35 +0200:
... Module Products.Archetypes.BaseFolder, line 104, in manage_afterAdd Module Products.Archetypes.BaseObject, line 179, in manage_afterAdd - __traceback_info__: (<CartManager at /whirlweb/backup/whirlweb/portal_cartmanager>, <PloneSite at /whirlweb/backup/whirlweb>, <Folder at /whirlweb/backup>) Module Products.Archetypes.Referenceable, line 217, in manage_afterAdd Module Products.Archetypes.Referenceable, line 348, in _referenceApply Module Products.ZCatalog.Lazy, line 158, in __getitem__ Module Products.BTreeFolder2.BTreeFolder2, line 210, in _getOb KeyError: '11464251260848050376'
Looks as if your references were inconsistent (as always you find out by examining the code in the lines identified by your traceback).
As always with inconsistencies, you have to resolve them. In your special case, there are 2 options:
1. you delete the inconsistent references
2. you add an object with id "11464251260848050376" to the references "BTreeFolder2".
participants (3)
-
Dieter Maurer -
robert rottermann -
Tres Seaver