[Zope-dev] Catalog in 2.3.1

Chris McDonough chrism@digicool.com
Thu, 19 Apr 2001 09:46:18 -0400


If this error is the "expected integer key" TypeError (the error value
isn't mentioned), it's indeed fixed in CVS and in 2.3.2b1

See http://lists.zope.org/pipermail/zope-checkins/2001-April/005802.html
for a patch against 2.3.1.

> Adrian Hungate wrote:
> 
> Are there some problems with the new catalog?
> 
> I have spotted two possible problems:
> 1) In CatalogAware, there is a function reindex_all, which appears to
> have a few problems, like calling index_object instead of
> reindex_object. Also, why "sub = self.objectValues()" when sub is
> never used?
> 
> 2) If I search a text index for a value that it does not contain, I
> get nothing back (No surprises there), but if I search for a word that
> is a substring of a word in the index, I get a Type Error (expected
> integer key). Did I do something wrong, or have I hit a bug?
> 
> Here is the traceback of the following search. A Title index that
> contains the word "wibble", search for the single word "wib":
> 
> Traceback (innermost last):
>   File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 223,
> in publish_module
>   File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 187,
> in publish
>   File C:\PROGRA~1\WebSite\lib\python\Zope\__init__.py, line 221, in
> zpublisher_exception_hook
>     (Object: catalog_support)
>   File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 171,
> in publish
>   File C:\PROGRA~1\WebSite\lib\python\ZPublisher\mapply.py, line 160,
> in mapply
>     (Object: results)
>   File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 112,
> in call_object
>     (Object: results)
>   File C:\PROGRA~1\WebSite\lib\python\App\special_dtml.py, line 127,
> in __call__
>     (Object: results)
>   File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_String.py,
> line 538, in __call__
>     (Object: results)
>   File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_Let.py, line
> 146, in render
>     (Object: rs="Catalog.searchResults(REQUEST)")
>   File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_Util.py,
> line 334, in eval
>     (Object: Catalog.searchResults(REQUEST))
>     (Info: REQUEST)
>   File <string>, line 0, in ?
>   File C:\PROGRA~1\WebSite\lib\python\Products\ZCatalog\ZCatalog.py,
> line 535, in searchResults
>     (Object: Traversable)
>   File C:\PROGRA~1\WebSite\lib\python\Products\ZCatalog\Catalog.py,
> line 651, in searchResults
>   File C:\PROGRA~1\WebSite\lib\python\Products\ZCatalog\Catalog.py,
> line 542, in _indexedSearch
>   File C:\PROGRA~1\WebSite\lib\python\SearchIndex\UnTextIndex.py, line
> 513, in _apply_index
>   File C:\PROGRA~1\WebSite\lib\python\SearchIndex\UnTextIndex.py, line
> 576, in query
>   File C:\PROGRA~1\WebSite\lib\python\SearchIndex\UnTextIndex.py, line
> 616, in evaluate
>   File C:\PROGRA~1\WebSite\lib\python\SearchIndex\UnTextIndex.py, line
> 448, in __getitem__
> TypeError: (see above)
> 
> --
> Adrian Hungate
> Manager, European I.S.
> Acucorp UK Limited