[Zope] VERY Confused!

seb bacon seb@jamkit.com
Tue, 23 Oct 2001 21:08:13 +0100

* Ben Ocean <zope@thewebsons.com> [011023 19:49]:
> Hi;
> I'm new to Python and Zope, but I'm at a loss to understand WHY this 
> doesn't work! I have this line in my dtml code:
> <span class="top"><img src="images/top" width=<dtml-var 
> "sizeCalc(1008,size)"> height=<dtml-var "sizeCalc(82,size)">></span>
> *size* is a dtml method and is defined thus:
> 1
> just the number one.


> Error Type: TypeError
> Error Value: int() can't convert non-string with explicit base

The 'size' argument in 

  <dtml-var "sizeCalc(1008, size)">

is a string; the first argument is an int.  Try string.atoi(1008) in
your python interpreter and compare it with string.atoi('1008').