[Product-Developers] Re: can't find kupu_library_tool

Raphael Ritz r.ritz at biologie.hu-berlin.de
Tue May 13 14:11:26 UTC 2008

Derek Richardson wrote:
> zope 2.10.4
> plone 3.0.5
> getToolByName(ctx, 'kupu_library_tool') gives an Attribute error because 
> it can't find the kupu_library_tool. yet i can see it in my zmi. any 
> ideas why? this code is running in an initialize() for a product.

Just for clarification: you mean the 'initialize' in __init__.py
that's executed on startup? There the context is the top-level
Zope application ('app' in zopectl debug) which doesn't know
anything about any Plone sites. Maybe that's your problem?


> I've 
> stepped through getToolByName and see that it's not found, but don't 
> have the skills to dig into the C code behind aq_get(). :(
> from Products.CMFCore import utils
> # ... lines pass ...
> kupuTool = utils.getToolByName(context, 'kupu_library_tool')
> Thanks!
> Derek

More information about the Product-Developers mailing list