[Zope] 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:vcard fn:robert rottermann n:rottermann;robert email;internet:[EMAIL PROTECTED] tel;work:031 333 10 20 tel;fax:031 333 10 23 tel;home:031 333 36 03 x-mozilla-html:FALSE version:2.1 end:vcard ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Btreefolder: How to fix Keyerror ???
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 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] BTreeFolder doubleclick patch
Hi Peter, Peter Bengtsson wrote: Peter, I can't find the attached files. Maybe you forgot to attach them or the list has removed them before sending to everybody? http://www.peterbe.com/zope/BTreeFolder2Patched/i BTreeFolder2 is part of core zope now, so you can likely submit your patch to the collector on zope.org for inclusion... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] BTreeFolder doubleclick patch
Peter Bengtsson wrote: Shane (and the Zope list), I've patched your lovely BTreeFolder2 product (version 1.0.1) so that I can doubleclick on options in the dropdown instead of having to click the Edit button. This is using Javascript and if Javascript is disabled, nothing happens, it just goes back to what it was like before. I've attached two patch files that you can chose to include. Peter, I can't find the attached files. Maybe you forgot to attach them or the list has removed them before sending to everybody? PS. To install the patch, this works for me: $ cd zope/Products/BTreeFolder2/ $patch -p1 BTreeFolder2.py.patch ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] BTreeFolder doubleclick patch
On 7/8/05, David Convent [EMAIL PROTECTED] wrote: Peter Bengtsson wrote: Shane (and the Zope list), I've patched your lovely BTreeFolder2 product (version 1.0.1) so that I can doubleclick on options in the dropdown instead of having to click the Edit button. This is using Javascript and if Javascript is disabled, nothing happens, it just goes back to what it was like before. I've attached two patch files that you can chose to include. Peter, I can't find the attached files. Maybe you forgot to attach them or the list has removed them before sending to everybody? http://www.peterbe.com/zope/BTreeFolder2Patched/i PS. To install the patch, this works for me: $ cd zope/Products/BTreeFolder2/ $patch -p1 BTreeFolder2.py.patch -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] BTreeFolder doubleclick patch
Shane (and the Zope list), I've patched your lovely BTreeFolder2 product (version 1.0.1) so that I can doubleclick on options in the dropdown instead of having to click the Edit button. This is using Javascript and if Javascript is disabled, nothing happens, it just goes back to what it was like before. I've attached two patch files that you can chose to include. PS. To install the patch, this works for me: $ cd zope/Products/BTreeFolder2/ $patch -p1 BTreeFolder2.py.patch -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] BTreeFolder doubleclick patch
Hi Peter or Shane. I have been using nested CMFBTreeFolders inside a CMF instance but I am not clear on difference between CMFBTreeFolder and BTreeFolder2. I am trying to limit the number of objects to 2000 per folder. Either folder type can be made inside a CMF site. Should I be using CMFBTreeFolder or BTreeFolder2 for CMF? Regards, David On Thursday, July 7, 2005, at 01:34 PM, Peter Bengtsson wrote: Shane (and the Zope list), I've patched your lovely BTreeFolder2 product (version 1.0.1) so that I can doubleclick on options in the dropdown instead of having to click the Edit button. This is using Javascript and if Javascript is disabled, nothing happens, it just goes back to what it was like before. I've attached two patch files that you can chose to include. PS. To install the patch, this works for me: $ cd zope/Products/BTreeFolder2/ $patch -p1 BTreeFolder2.py.patch -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] BTreeFolder (easy?) questions
1. Can I blithely use BTreeFolder in place of Folder without loss of functionality? 2. Can I successfully inherit from BTreeFolder in ZClasses (assuming that I uncomment registerBaseClass, which has been commented out in all BTreeFolder versions so far)? -- Dennis Nichols [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] BTreeFolder (easy?) questions
Dennis Nichols wrote: 1. Can I blithely use BTreeFolder in place of Folder without loss of functionality? afaik, yes. btreefolders subclass from folders and reimplement the setOb, getOb methods of a folder and the __getattr__ method, ie they have the same external interface. 2. Can I successfully inherit from BTreeFolder in ZClasses (assuming that I uncomment registerBaseClass, which has been commented out in all BTreeFolder versions so far)? can't think of any reasons why not, although you might might want to consider composition so you can allow yourself room to transition based on experience. Cheers Kapil ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] BTreeFolder
Been there, done that s. It requires 2.2+. But boy am I looking forward to using it as soon as 2.2 is out of beta. VBG. thank for your answer. As soon as I have a bit more time i will try 2.2+. Robert -- Robert Wohlfahrt ([EMAIL PROTECTED]) Tel: 0179 / 2980074 Fax: 0351 / 2880145 ___ Zope maillist - [EMAIL PROTECTED] 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 )
[Zope] BTreeFolder
Hi, I want to try out the BTreeFolder product. I unpacked it an restarted Zope, but int the Products-management screen it shows up as a broken product. I use Zope-2.1.4 ... Below is the Traceback it gives me on a click: - BTreeFolder Import Traceback Traceback (innermost last): File "/usr/local/Zope-2.1.4-src/lib/python/OFS/Application.py", line 387, in import_products product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/Zope/lib/python/Products/BTreeFolder/__init__.py", line 89, in ? import BTreeFolder File "/usr/local/Zope/lib/python/Products/BTreeFolder/BTreeFolder.py", line 89, in ? from AccessControl import getSecurityManager ImportError: cannot import name getSecurityManager - any ideas? Robert -- Robert Wohlfahrt ([EMAIL PROTECTED]) Tel: 0179 / 2980074 Fax: 0351 / 2880145 ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] BTreeFolder
Robert Wohlfahrt wrote: Hi, I want to try out the BTreeFolder product. I unpacked it an restarted Zope, but int the Products-management screen it shows up as a broken product. I use Zope-2.1.4 ... any ideas? Been there, done that s. It requires 2.2+. But boy am I looking forward to using it as soon as 2.2 is out of beta. VBG. -- Tim -- Opportunity is missed by most people because it is dressed in overalls and looks like work. Thomas Edison ___ Zope maillist - [EMAIL PROTECTED] 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 )