[Zope] Key Error in Catalog Reindex

KJZZ Webmaster kjzz.webmaster at riomail.maricopa.edu
Mon Jan 22 11:53:51 EST 2007


I am using zope 2.8.1. and am using the following dtml method to reindex
the catalog:

<dtml-let URL1=HTTP_REFERER>
<dtml-call "Catalog.manage_catalogReindex(REQUEST, RESPONSE, URL1)">
<dtml-call expr="RESPONSE.redirect(URL1)">
</dtml-let>

However, midway through the reindex, I am receiving the following error message:

Traceback (innermost last):
  Module ZPublisher.Publish, line 113, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 40, in call_object
  Module OFS.DTMLMethod, line 153, in __call__
   - <DTMLMethod at /somepath/somedtmlmethod>
   - Physical Path: //somepath/somedtmlmethod
KeyError: 'validate'

I checked the zope source file here:

Zope-2.8.1-final\lib\python\OFS\DTMLMethod.py

and found the reference to the "validate" method in line 128:

        if self.__dict__.has_key('validate'):
            first_time_through = 0
        else:
            self.__dict__['validate'] = security.DTMLValidate
            first_time_through = 1
        try:

My questions are these:

a) what changes could I to the catalog to avoid this error in the future?

(I have already cleared and rebuilt our catalog using the manage_catalogFind
tab within the catalog).  Are there certain object types that I should keep
out of the catalog?

Is the catalog getting too large, and maybe the reindex is taking too long
to complete?

b) are there any changes to the script \lib\python\OFS\DTMLMethod.py that
I could make which would eliminate, or at least render this error message
harmless?

When this key error occurs, the catalog does not index fully, and so objects
are left out of the catalog.

Thanks for your advice.

John T.





More information about the Zope mailing list