What is wrong with this construct? <dtml-let a="mp_entries.getEntryField(_['key'],'f1071131972')" b="mp_entries.getEntryField(_['key'],'f1071139087')" c="a*b" <dtml-var c> </dtml-let> I get this Zope Error: Error Type: TypeError Error Value: unsupported operand type(s) for * a and b are both float variables. Traceback (innermost last): * Module ZPublisher.Publish, line 49, in publish * Module ZPublisher.mapply, line 32, in mapply * Module ZPublisher.Publish, line 38, in call_object * Module OFS.DTMLDocument, line 102, in __call__ * Module DocumentTemplate.DT_String, line 361, in __call__ * Module DocumentTemplate.DT_Let, line 70, in render * Module DocumentTemplate.DT_Util, line 175, in eval __traceback_info__: a * Module <string>, line 2, in f * *
Stephan Goeldi wrote at 2003-12-11 14:49 +0100:
What is wrong with this construct?
<dtml-let a="mp_entries.getEntryField(_['key'],'f1071131972')" b="mp_entries.getEntryField(_['key'],'f1071139087')" c="a*b"
<dtml-var c>
</dtml-let>
I get this Zope Error: Error Type: TypeError Error Value: unsupported operand type(s) for *
a and b are both float variables.
You think they should be but apparently, they are not (otherwise, "a*b" would not raise this exception). Try "float(a) * float(b)". -- Dieter
participants (2)
-
Dieter Maurer -
Stephan Goeldi