[Zope] script returns error
Jim Washington
jwashin@vt.edu
Fri, 23 Nov 2001 23:44:06 -0500
Raymond Norton wrote:
>In the Tutorial,Under "Coding Logic with Scripts: I have successfully
>created the example for calculating compound interest. When I submit the
>form with a value of amount = 1000, rate = 6, periods = 12, years = 10, I
>get this error.
>
>Error Type: NameError
>Error Value: global name 'calculateCompoundingInterest' is not defined
>
>Being new I am not sure what is wrong. I am continuing on, but would like to
>get this to work.
>
Put the quotes back around """Calculate Compounding Interest""". I am
guessing that you got rid of the quotes, and that kinda worked to remove
your previous "syntax error" problem. Except now it is looking for
calculateCompoundingInterest as a variable.
Another way to make lines that do not parse (e.g., comment lines) in
python is to put # in front of it. Like this:
# calculateCompoundingInterest
hth,
-- Jim Washington