[Zope] VERY Confused!

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


* Ben Ocean <zope@thewebsons.com> [011023 20:47]:
> ><snip>
> >
> >> 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.
> 
> Hmm. Tested *both* variables using type and *both* returned string.
> 

<snip>

> I forgot to post that I *had* tried that. This is the error:
> Error Type: AttributeError
> Error Value: __int__
> 
> I'm even more confused than before and concerned that there might be 
> something wrong with my installation at this point.

Unlikely ;-)

I just tried the code to make sure, and it works for me; the number
being passed as the first argument *is* an int.

The AttributeError suggests you're passing an object rather than a
string or an int to the script.  

I feel sure you have somehow got your type checking wrong when
you were debugging, since strings and ints would never give this
AttributeError, and the first argument, 2008, is definitely an int.

Perhaps you have a namespace clash with an object elsewhere in your
acquisition path, also called 'size'?  Try renaming the 'size' method.

seb