'int' object has no attribute 'objectValues'
Hi; I've written this PT: <span tal:define="batch here/quotes/objectValues; num python:len(batch)"> <p tal:replace="python:here.randomNumber(num)" /> </span> ...which calls this external method: import random def randomNumber(num): return random.random(num) ...and throws this error: Error Type: AttributeError Error Value: 'int' object has no attribute 'objectValues' Why? TIA, Tony ________________________________________________________________________ AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.com.
<span tal:define="batch here/quotes/objectValues; num python:len(batch)"> <p tal:replace="python:here.randomNumber(num)" /> </span> Check what here/quotes is evaluating to. Seems that it is int.
-- Maciej Wisniowski
participants (2)
-
Maciej Wisniowski -
tonylabarbara@aol.com