[Zope] Zope 2.3.1 Catalog is there a bad bug in this?

Chris McDonough chrism@digicool.com
Thu, 03 May 2001 07:17:43 -0400


Yikes!  I think you found a Catalog bug.  Sorry about this.  I don't
know how this didn't show up before, it's a pretty obvious bug.

What's happening here is that you're trying to index a method of an
object that requires an argument.  The Catalog can't provide it an
argument because it's not omniscient.  ;-)  The Catalog (actually
TextIndexes) should catch this and not fail like it does currently.  But
it still won't Catalog the results of the method.  The traceback doesn't
provide the index name, so I'm not sure which index this is happening
on, but it's definitely a TextIndex, and it's not any of the default
indexes.

Try doing this:

  - in line 326 of lib/python/SearchIndex/UnTextIndex.py, change:

    except AttributeError:

    to

    except (AttributeError, TypeError):

  - then do an "Update Catalog".

(This bugfix will be in the next Zope release).

Your recatalog should no longer fail.  When this is done, you should
investigate your indexes to see if you're mistakenly attempting to
catalog a method that needs arguments, and if this is fouling up your
application by neglecting to index objects that should be indexed.

Also, it looks like you upgraded to 2.3.1.  The Catalog had some pretty
major bugs up til 2.3.1b1.  Thus, I'd suggest upgrading to 2.3.2,
deleting the catalog, and rebuilding it via "Find Objects" if it's
feasible to do so.  There is also an upgrade process for older Catalogs
detailed in the CHANGES.txt if this isn't feasible.  The Catalog in
2.3.2 is pretty stable (except for the bug in line 326 of
UnTextIndex.py, which you'll need to fix in there too ;-)

- C

Max M wrote:
> 
> > From: chrism@sylvanoffice.com [mailto:chrism@sylvanoffice.com]On Behalf
> > Of Chris McDonough
> 
> > I don't know what version you upgraded to, but doing an "Update Catalog"
> > on the Advanced tab should rid your Catalog of this problem.  The state
> > in older catalogs is an unknown, and doing this puts all the moons in
> > the right order.
> 
> I tried that, but then I get the below error:
> 
> Error Type: TypeError
> Error Value: not enough arguments; expected 2, got 1>
> 
> Traceback (innermost last):
>   File
> /usr/local/zope/Zope-2.3.1-linux2-x86/lib/python/ZPublisher/Publish.py, line
> 223, in publish_module
>   File
> /usr/local/zope/Zope-2.3.1-linux2-x86/lib/python/ZPublisher/Publish.py, line
> 187, in publish
>   File /usr/local/zope/Zope-2.3.1-linux2-x86/lib/python/Zope/__init__.py,
> line 221, in zpublisher_exception_hook
>     (Object: Traversable)
>   File
> /usr/local/zope/Zope-2.3.1-linux2-x86/lib/python/ZPublisher/Publish.py, line
> 171, in publish
>   File
> /usr/local/zope/Zope-2.3.1-linux2-x86/lib/python/ZPublisher/mapply.py, line
> 160, in mapply
>     (Object: manage_catalogReindex)
>   File
> /usr/local/zope/Zope-2.3.1-linux2-x86/lib/python/ZPublisher/Publish.py, line
> 112, in call_object
>     (Object: manage_catalogReindex)
>   File
> /usr/local/zope/Zope-2.3.1-linux2-x86/lib/python/Products/ZCatalog/ZCatalog.
> py, line 325, in manage_catalogReindex
>     (Object: Traversable)
>   File
> /usr/local/zope/Zope-2.3.1-linux2-x86/lib/python/Products/ZCatalog/ZCatalog.
> py, line 429, in catalog_object
>     (Object: Traversable)
>   File
> /usr/local/zope/Zope-2.3.1-linux2-x86/lib/python/Products/ZCatalog/Catalog.p
> y, line 448, in catalogObject
>   File
> /usr/local/zope/Zope-2.3.1-linux2-x86/lib/python/SearchIndex/UnTextIndex.py,
> line 323, in index_object
> TypeError: (see above)
> 
> Max M. W. Rasmussen,    Denmark.   New Media Director
> private: maxmcorp@worldonline.dk work: maxm@normik.dk
> -----------------------------------------------------
> Shipping software is an unnatural act
> 
> _______________________________________________
> 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 )