ZCatalog raises index out of range exception error
Hi listies, On a client's server I created a ZCatalog, but when using "Find Items to ZCatalog" and clicking on "Find" in the form, Zope raises the "list index out of range" error shown in detail at the end of this e-mail. Then I took the whole Data.fs, put it on one of our servers, where everything worked as usual. Since our client wants to create various ZCatalogs, he has to use this functionality :-/ Any ideas where to start looking for the reason of this error? Our client's server's configuration is the following: Zope version: Zope 2.2.4 (source release, python 1.5.2, linux2) [ I have also tried with 2.2.2 source] Python version: 1.5.2 (#1, Aug 25 2000, 09:33:37) [GCC 2.96 20000731 (experimental)] System Platform: linux-i386 [RedHat 7.0] Any help is greatly appreciated! Martin ___________________________________________________________________ Here is the output when I submit the form "Find Items to ZCatalog": Error Type: IndexError Error Value: list index out of range Traceback (innermost last): File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/Zope-2.2.4-src/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_catalogFoundItems) File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_catalogFoundItems) File /usr/local/Zope-2.2.4-src/lib/python/Products/ZCatalog/ZCatalog.py, line 321, in manage_catalogFoundItems (Object: Traversable) IndexError: (see above)
On Fri, 15 Dec 2000, Martin Winkler wrote:
On a client's server I created a ZCatalog, but when using "Find Items to ZCatalog" and clicking on "Find" in the form, Zope raises the "list index out of range" error shown in detail at the end of this e-mail. Then I took the whole Data.fs, put it on one of our servers, where everything worked as usual.
Do you have a SiteRoot-ed environment? I believe I saw this error when trying to use the Catalog in a SiteRoot-ed folder... No solution, sorry ;) Stefan
On Saturday 16 December 2000, at 19 h 21, the keyboard of "Stefan H. Holek" <stefan@epy.co.at> wrote:
Do you have a SiteRoot-ed environment?
I do.
I believe I saw this error when trying to use the Catalog in a SiteRoot-ed folder...
Me too :-(
No solution, sorry ;)
:-(
I believe I saw this error when trying to use the Catalog in a SiteRoot-ed folder...
Me too :-(
And me too. The most irritating Zope bug for me.
No solution, sorry ;)
:-(
Partial solution: at something like 2:00 AM delete your SiteRoot rule, reindex with ZCatalog and create this rule again. Searching works (although I needed to edit the paths found a bit in the form responsilbe for search results presentation). I can imagine writing the script (XMLRPC?) which would do it from the cron job - although I have not yet found spare time (I still think someone will do something with this nasty bug). -- http://www.mk.w.pl / Marcin.Kasperski | Dokumentację kodu warto wygenerować: @softax.com.pl | http://www.mk.w.pl/narzedzia/narzedzia_gendoc @bigfoot.com \
On Tue, 19 Dec 2000, Marcin Kasperski wrote:
Partial solution: at something like 2:00 AM delete your SiteRoot rule, reindex with ZCatalog and create this rule again. Searching works (although I needed to edit the paths found a bit in the form responsilbe for search results presentation).
You don't need to delete your SiteRoot. You can use one of techniques described in SiteRoot docs to suppress it within particular request. I use trick with phantom folder, call it 'Z'. So my AccessRule looks like: Is there a path, and does it start with 'Z'? <dtml-let stack="REQUEST['TraversalRequestNameStack']"> <dtml-if "stack and stack[-1]=='Z'"> Get rid of 'Z': <dtml-call "stack.pop()"> Put it back logically: <dtml-call "REQUEST.setVirtualRoot('Z')"> <dtml-else> Is the first-level domain 'hotsite.com'? Ignore sub-domains and port number. <dtml-if "_.string.split(_.string.lower(_.string.split(HTTP_HOST, ':')[0]), '.')[-2:]==_.string.split('www.hotsite.com','.')[-2:]"> Add physical root: <dtml-call "REQUEST['TraversalRequestNameStack'].append('hotsite')"> <dtml-call "REQUEST.set('SiteRootPATH','/')"> </dtml-if> </dtml-if> </dtml-let> In my SiteRoot, I have all properties left blank. When I access my server using URL like www.myserver.com/Z/something, then SiteRoot is turned off. With this solution, your site may be still accessible to customers, while you are working without SiteRoot (i.e. cataloging objects). ololo@zeus.polsl.gliwice.pl /--------------------------------------\ | `long long long' is too long for GCC | \--------------------------------------/
participants (5)
-
Aleksander Salwa -
Marcin Kasperski -
Martin Winkler -
Stefan H. Holek -
Stephane Bortzmeyer