[Zope] ZCatalog search problem (was: no subject)

Aaron Payne aaron@aaronpayne.com
Thu, 29 Mar 2001 13:48:24 -0500


At 01:30 PM 3/29/01 -0500, Chris McDonough wrote:
>Can this be duplicated without ZPatterns?  E.g., with the Catalog in its
>current state can you use its methods to reproduce the same error?

Hi Chris,

Yes.  Here is what I did.
In the ZCatalog
1. On the Find Objects page
     Find objects of type: Folder  (any type of obj will work)
2. On the Catalog page
     Select object, hit Remove
         The problem occurs when you select more than half of the items for 
removal.  This is strange.  If I select 1 for removal 2 are  removed. 
Select 3, 6 are removed, etc.
The error returned is a little different.

Error Type: ValueError
Error Value: __len__() should return >= 0

Traceback (innermost last):
   File /usr/local/etc/Zope2d/lib/python/ZPublisher/Publish.py, line 223, 
in publish_module
   File /usr/local/etc/Zope2d/lib/python/ZPublisher/Publish.py, line 187, 
in publish
   File /usr/local/etc/Zope2d/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
     (Object: Traversable)
   File /usr/local/etc/Zope2d/lib/python/ZPublisher/Publish.py, line 171, 
in publish
   File /usr/local/etc/Zope2d/lib/python/ZPublisher/mapply.py, line 160, in 
mapply
     (Object: manage_catalogView)
   File /usr/local/etc/Zope2d/lib/python/ZPublisher/Publish.py, line 112, 
in call_object
     (Object: manage_catalogView)
   File /usr/local/etc/Zope2d/lib/python/Shared/DC/Scripts/Bindings.py, 
line 324, in __call__
     (Object: manage_catalogView)
   File /usr/local/etc/Zope2d/lib/python/Shared/DC/Scripts/Bindings.py, 
line 353, in _bindAndExec
     (Object: manage_catalogView)
   File /usr/local/etc/Zope2d/lib/python/App/special_dtml.py, line 236, in 
_exec
     (Object: manage_catalogView)
   File /usr/local/etc/Zope2d/lib/python/DocumentTemplate/DT_Var.py, line 
311, in render
     (Object: searchResults)
   File /usr/local/etc/Zope2d/lib/python/DocumentTemplate/DT_Var.py, line 
402, in len_format
ValueError: (see above)

-Aaron

> > Hi all,
> >
> > I am getting an error when I query a ZCatalog.  I'm working using
>ZPatterns
> > with Zope 2.3.1b3 (source release, python 1.5.2, linux2), Python Version
> > 1.5.2, System Platform freebsd4.