I’m going thru the online zope book (2.6) and trying out the simple interest rate calculator web application under the section:

Creating a Basic Zope Application Using Page Templates and Scripts

http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/BasicObject.stx

I’ll attach the error log:

 

Time

2009/01/13 09:57:11.072 US/Central

User Name (User Id)

admin (admin)

Request URL

http://localhost:8080/interest/interestRateDisplay

Exception Type

AttributeError

Exception Value

calculateCompoundingInterest

Traceback (innermost last):

  • Module ZPublisher.Publish, line 119, in publish
  • Module ZPublisher.mapply, line 88, in mapply
  • Module ZPublisher.Publish, line 42, in call_object
  • Module Shared.DC.Scripts.Bindings, line 313, in __call__
  • Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  • Module Products.PageTemplates.ZopePageTemplate, line 330, in _exec
  • Module Products.PageTemplates.ZopePageTemplate, line 427, in pt_render
  • Module Products.PageTemplates.PageTemplate, line 89, in pt_render
  • Module zope.pagetemplate.pagetemplate, line 117, in pt_render
  • Module zope.tal.talinterpreter, line 271, in __call__
  • Module zope.tal.talinterpreter, line 346, in interpret
  • Module zope.tal.talinterpreter, line 623, in do_insertText_tal
  • Module Products.PageTemplates.Expressions, line 228, in evaluateText
  • Module zope.tales.tales, line 696, in evaluate
    URL: /interest/interestRateDisplay
    Line 10, Column 4
    Expression: <PythonExpr here.calculateCompoundingInterest(principal, interest_rate, periods, years)>
    Names:
·                {'container': <Folder at /interest>,
·                 'context': <Folder at /interest>,
·                 'default': <object object at 0x0071C528>,
·                 'here': <Folder at /interest>,
·                 'loop': {},
·                 'nothing': None,
·                 'options': {'args': ()},
·                 'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x06EB1A08>,
·                 'request': <HTTPRequest, URL=http://localhost:8080/interest/interestRateDisplay>,
·                 'root': <Application at >,
·                 'template': <ZopePageTemplate at /interest/interestRateDisplay>,
·                 'traverse_subpath': [],
 'user': <PropertiedUser 'admin'>}
  • Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
    __traceback_info__: here.calculateCompoundingInterest(principal, interest_rate, periods, years)
  • Module PythonExpr, line 1, in <expression>

AttributeError: calculateCompoundingInterest

form

interest_rate

12.0

years

12

periods

4

principal

20000.0

 

 

Does this indicate an error with my python script?

 

 

 

Joseph Thomas

College of American Pathologists

http://www.cap.org