[Zope] lis index out of range on an PythonEM call ????

Doyon, Jean-Francois Jean-Francois.Doyon@CCRS.NRCan.gc.ca
Mon, 5 Nov 2001 12:34:01 -0500


Hello,

I have an external method that I call using:

<dtml-with expr=3D"getmap('177')" mapping>

And all works fine ...

But if I change that value 177 to 30516 I get :

Error Type: IndexError
Error Value: list index out of range

I faily to understand why ... The value is actually passed as a string,
which is what i want ... in the PythonEM, all that's done is a string
concatenation:

def getmap(id):
	mapserver =3D
urlopen("http://www-gad2.ccrs.nrcan.gc.ca/cgi-bin/mapserv?map=3D/home/ma=
pdata/
nac/"+id+".map&template=3Dto_zope.html")
	<more code>

Anybody  know why this is happening and how to get around it?

Thank you,

Jean-Fran=E7ois Doyon
Internet Service Development and Systems Support
GeoAccess Division
Canadian Center for Remote Sensing
Natural Resources Canada
http://atlas.gc.ca
Phone: (613) 992-4902
Fax: (613) 947-2410