[Zope] ZCatalog search problem (was: no subject)
Chris McDonough
chrism@digicool.com
Thu, 29 Mar 2001 14:24:07 -0500
Ohhhh!! Sorry, yes, this is fixed in the 2.3 branch and will be out with
the next release. There was a place where the __len__ of the catalog object
could "go negative" that was fixed. See
http://lists.zope.org/pipermail/zope-checkins/2001-March/005673.html.
The __nonzero__ bit was throwing me off.
----- Original Message -----
From: "Aaron Payne" <aaron@aaronpayne.com>
To: "Chris McDonough" <chrism@digicool.com>; <zope@zope.org>
Sent: Thursday, March 29, 2001 1:48 PM
Subject: Re: [Zope] ZCatalog search problem (was: no subject)
> 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.
>
>
>