[Zope] Re: Newbie - passing a list to an External Method

Dieter Maurer dieter@handshake.de
Wed, 23 Apr 2003 21:08:14 +0200


Ashley Lloyd wrote at 2003-4-23 10:19 +0100:
 > I have tried as you suggested, changing the function definition to:
 > def run(self, fileID='mydefaultID.pdf',lines=['Error','no lines passed 
 > in']):
 > 
 > and calling it with:
 > <dtml-let link="sping2(fileID=fileId,lines=mylines)">
 > 
 > But, again I seem to get the same (or a similar) error:
 > 
 > =====================================================================
 > Error Type AttributeError
 > 
 > Error Value __getitem__
 > ...
 > File "C:\PROGRA~1\ZopeSite\Extensions\formatted-strings.py", line 29, in run
 > for line in lines:
 > AttributeError: __getitem__

"lines" is not a list at this place (more generally, it is not
a sequence).

I do not know why. I would use a debugger (e.g. WingIDE)
to understand precisely what happens.


Dieter