[ZCM] [ZC] 206/ 4 Comment "ZCatalogs fail when > 32 elements are passed as part of the searchResults query on PathIndex indexes"

Collector: Zope Bugs and Patches ... zope-coders@zope.org
Mon, 11 Feb 2002 09:01:48 -0500


Issue #206 Update (Comment) "ZCatalogs fail when > 32 elements are passed as part of the searchResults query on PathIndex indexes"
 Status Accepted, Catalog/bug medium
To followup, visit:
  http://collector.zope.org/Zope/206

==============================================================
= Comment - Entry #4 by ajung on Feb 11, 2002 9:01 am

check if the following works:

dict = { 'path': { 'query': [your long lists ..] } }

zcatalog.searchResults(dict)
________________________________________
= Assign - Entry #3 by ajung on Feb 11, 2002 9:00 am

 Status: Pending => Accepted

 Supporters added: ajung


________________________________________
= Comment - Entry #2 by chrisdeckard on Feb 8, 2002 4:53 pm

I posted the wrong version info...  Sorry.  

It's Zope 2.4.3 with python 2.1.1.

Thanks,
-Chris
________________________________________
= Request - Entry #1 by chrisdeckard on Feb 8, 2002 4:52 pm

Cannot query a zcatalog when I have more than 32 elements in the 'path' portion of a query.
Example code followed by traceback:

Index on a zcatalog object has a PathIndex index called "path".

My query looks like this:

query = {}
query['path'] = [list with > 32 elements]

zcatalog.searchResults(query)

I checked, and there are no duplicate elements (though I don't think
that should matter).  My searchResults() works on anything else that
has less than 32 elements in the path list.   I haven't tried it for
the other indexes.

And I get the error message:


Zope Error!

Zope has encountered an error while publishing this resource.

If this error persists, please Send Feedback.

Error Type: TypeError
Error Value: invalid argument

Troubleshooting Suggestions

    * The URL may be incorrect.
    * The parameters passed to this resource may be incorrect.
    * A resource that this resource relies on may be encountering an
error.

For more detailed information about the error, please refer to the HTML
source for this page.

If the error persists please contact the site maintainer. Thank you for
your patience.

Traceback (innermost last):
  File
/data/www/Zope.0/src/Zope-2.4.3-src/lib/python/ZPublisher/Publish.py, line
171, in publish
  File
/data/www/Zope.0/src/Zope-2.4.3-src/lib/python/ZPublisher/mapply.py, line
160, in mapply
    (Object: sumEvents)
  File
/data/www/Zope.0/src/Zope-2.4.3-src/lib/python/ZPublisher/Publish.py, line
112, in call_object
    (Object: sumEvents)
  File
/data/www/Zope.0/src/Zope-2.4.3-src/lib/python/Shared/DC/Scripts/Bindings.py,
line 324, in __call__
    (Object: sumEvents)
  File
/data/www/Zope.0/src/Zope-2.4.3-src/lib/python/Shared/DC/Scripts/Bindings.py,
line 354, in _bindAndExec
    (Object: sumEvents)
  File
/data/www/Zope.0/src/Zope-2.4.3-src/lib/python/Products/PythonScripts/PythonScript.py,
line 363, in _exec
    (Object: sumEvents)
    (Info: ({'script': , 'context': , 'container': , 'traverse_subpath':
[]}, ('papers_and_proposals_reviewed', '1.0', '2001', 'papers_reviewed',
'person_type=[person_federal_unit_or_cru_staff]', None, None, None), {},
(None, None, None, None, None, None, None, None)))
  File Script (Python), line 185, in sumEvents
  File
/data/www/Zope.0/src/Zope-2.4.3-src/lib/python/Products/ZCatalog/ZCatalog.py,
line 653, in searchResults
    (Object: CatalogEvents)
  File
/data/www/Zope.0/src/Zope-2.4.3-src/lib/python/Products/ZCatalog/Catalog.py,
line 650, in searchResults
  File
/data/www/Zope.0/src/Zope-2.4.3-src/lib/python/Products/ZCatalog/Catalog.py,
line 538, in _indexedSearch
  File
/data/www/Zope.0/src/Zope-2.4.3-src/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py,
line 362, in _apply_index
    (Object: path)
TypeError: invalid argument

==============================================================