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

Chris McDonough chrism@digicool.com
Thu, 29 Mar 2001 13:30:31 -0500


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?

----- Original Message -----
From: "Aaron Payne" <aaron@aaronpayne.com>
To: <zope@zope.org>
Sent: Thursday, March 29, 2001 12:42 PM
Subject: [Zope] (no subject)


> 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.
>
> Error Type: ValueError
> Error Value: __nonzero__ should return >= 0
>
> Here is the scenerio leading to the problem.
> 1. Create an object in a rack with newItem()
>      Search ZCatalog for the item and it is found.
> 2. Delete the item
>      Search ZCatalog for the item and the error is produced.
>
> Updating or Clearing the catalog resolves the problem. Here is the
> Skinscript method I use with the Catalog.
>
> WHEN OBJECT ADDED CALL ProjectCatalog.catalog_object(self,
> _.string.join(self.getPhysicalPath(),'/'))
> WHEN OBJECT DELETED CALL
> ProjectCatalog.uncatalog_object(_.string.join(self.getPhysicalPath(),'/'))
> WHEN OBJECT CHANGED CALL
>
ProjectCatalog.uncatalog_object(_.string.join(self.getPhysicalPath(),'/')),
> ProjectCatalog.catalog_object(self,
_.string.join(self.getPhysicalPath(),'/'))
>
> Another thing,  after I edit the item it is no longer indexed in the
catalog.
> Is this another version of the key error issue?
>
> 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: catalogItems)
>    File /usr/local/etc/Zope2d/lib/python/ZPublisher/Publish.py, line 112,
> in call_object
>      (Object: catalogItems)
>    File /usr/local/etc/Zope2d/lib/python/OFS/DTMLMethod.py, line 189, in
> __call__
>      (Object: catalogItems)
>    File /usr/local/etc/Zope2d/lib/python/DocumentTemplate/DT_String.py,
> line 538, in __call__
>      (Object: catalogItems)
>    File /usr/local/etc/Zope2d/lib/python/DocumentTemplate/DT_In.py, line
> 652, in renderwob
>      (Object: ProjectCatalog)
> ValueError: (see above)
>
> -thanks,
> Aaron
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>