[Zope] ZCatalog reindexing fails
Jens Vagelpohl
jens@zope.com
Wed, 6 Nov 2002 08:14:26 -0500
inside the getOwner method the application looks up the "_owner"
attribute which contains two items: a path to a user folder and a user
ID. the user folder is thenretrieved with the help of this path and it
gets queried with the user ID from the _owner property to get the full
user object for that owner.
whatever the system finds when it uses the path in the _owner attribute
to retrieve the user folder points to something that does not have a
getUserById method.
one thing you could do to find out what user folder is involved is
this: in line 87 of getOwner in
<zope_root>/lib/python/AccessControl/Owned.py you can either put
something like a set_trace and inspect the objects if you are savvy
with the debugger, or you could change that line. instead of...
user = udb.getUserById(oid, None)
you could do...
try:
user = udb.getUserById(oid, None)
except AttributeError:
raise AttributeError, 'User folder at %s is broken' %
udb.absolute_url(1)
that will put this information into the error traceback you see in your
nrowser. you must restart zope for the change to take effect.
jens
On Wednesday, Nov 6, 2002, at 05:26 US/Eastern, Lars H. Korte wrote:
> Hi,
>
> I'm trying to reindex the SearchableText index in my portal_catalog.
> After clicking on reindex and waiting a short time an Attribute Error
> occurs saying "getUserById"
>
> the error log has the following traceback:
> ---
> Traceback (innermost last):
> Module ZPublisher.Publish, line 98, in publish
> Module ZPublisher.mapply, line 88, in mapply
> Module ZPublisher.Publish, line 39, in call_object
> Module Products.ZCatalog.ZCatalog, line 472, in manage_reindexIndex
> Module Products.ZCatalog.ZCatalog, line 457, in reindexIndex
> Module Products.CMFCore.CatalogTool, line 232, in catalog_object
> Module Products.ZCatalog.ZCatalog, line 500, in catalog_object
> Module Products.ZCatalog.Catalog, line 295, in catalogObject
> Module Products.ZCatalog.Catalog, line 403, in recordify
> Module Products.CMFDefault.DublinCore, line 104, in Creator
> Module AccessControl.Owned, line 87, in getOwner
> AttributeError: getUserById
> ---
>
> I'm using Zope 2.6.0 + CMF 1.3 + Plone1.0b2 and LDAP Authentication.
>
> There seems to be a problem with a username I think. How can I make
> Zope
> print (perhaps in a file) which name that is? Or could this error have
> another reason?
> I would appreciate any help!!
>
> regards
> Lars
>
> _______________________________________________
> 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 )