[Zope-dev] Errors searching ZCatalog

Itamar Shtull-Trauring itamars@ibm.net
Wed, 08 Mar 2000 12:00:05 +0200


Every once  in a while our ZCatalog (from CVS) seems to get "corrupted" -
usually one (or maybe more) items cause the following error whenever they
come up in a search for certian search terms.  For example today I seached
for "tomato" (/recipe/manage_catalogView?title=recipe) and got this error:

	Error Type: KeyError
	Error Value: 431

Traceback (innermost last):
  File /home/zope/lib/python/ZPublisher/Publish.py, line 214, in
publish_module
  File /home/zope/lib/python/ZPublisher/Publish.py, line 179, in publish
  File /home/zope/lib/python/Zope/__init__.py, line 211, in
zpublisher_exception_hook
    (Object: ElementWithAttributes)
  File /home/zope/lib/python/ZPublisher/Publish.py, line 165, in publish
  File /home/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply
    (Object: manage_catalogView)
  File /home/zope/lib/python/ZPublisher/Publish.py, line 102, in call_object
    (Object: manage_catalogView)
  File /home/zope/lib/python/App/special_dtml.py, line 120, in __call__
    (Object: manage_catalogView)
    (Info: /home/zope/lib/python/Products/ZCatalog/catalogView.dtml)
  File /home/zope/lib/python/DocumentTemplate/DT_String.py, line 502, in
__call__
    (Object: manage_catalogView)
  File /home/zope/lib/python/DocumentTemplate/DT_In.py, line 592, in
renderwb
    (Object: searchResults)
  File /home/zope/lib/python/Products/ZCatalog/Lazy.py, line 190, in
__getitem__
  File /home/zope/lib/python/Products/ZCatalog/Catalog.py, line 187, in
__getitem__
KeyError: (see above)

I discovered the entry that causes this, and it seems to be cataloged okay -
i.e. if I'm just browsing the catalog it displays fine, and in some searches
it displays fine.  Only when I search by specific words in the title it
gives an error - and not all words.  Updating the catalog solves the
problem.  It's title is "Tomato Bread Salad", which doesn't seem to have any
wierd characters or anything.

-- 
Itamar S.T.  itamars@ibm.net