[Zope] Why do I get an attribute error when one tool calls another tool?

Peter Millar peter.millar at parasyn.com.au
Sun Dec 5 20:31:51 EST 2004


I can see that the MemberDataTool is able to call the portal_membership
tool using the getToolByName method. (and there are hundreds more
examples where this is successful)

But when I try to do it I get an attribute error, (before you ask, yes
the first tool has been successfully created first prior to me trying to
add this second tool.):

Traceback (innermost last):
Module ZPublisher.Publish, line 101, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 39, in call_object
Module Products.CMFCore.utils, line 427, in manage_addTool
Module Products.ParasynPIP.ParasynChartTool, line 87, in __init__
Module Products.ParasynPIP.ParasynPIPChartTool, line 80, in
getParasynPIPTool
Module Products.CMFCore.utils, line 75, in getToolByName
AttributeError: parasynpip_tool

My code in the second tool looks like:

def __init__(self):
   ppt =   getToolByName(self,"parasynpip_tool")

Any help anyone could provide would be fantastic, thanks in advance.

My Install is zope 2.7.3, python 2.3, plone 2.0, no other installed
products, on windoze, 
____________________________________________ 
Peter Millar 



More information about the Zope mailing list