John wrote:
> I've written a program which calculates areas of grid cells distributed 
> over the globe. It works fine with Python 2.5, however, when I run it 
> with 2.4 (the Enthon edition) I get the following error:
> 
> OverflowError: long int too large to convert to int
> 
> It occurs on this line:
> 
>  for ix in range(nx): area[ix,iy]=gridarea   
> 
> I have no idea which int it's referring to? The values of ix/nx will not 
> exceed 360, iy will not exceed 180. Any suggestions on what to change 
> for the backward compatability?

Are you sure nx is not large? The argument to range() must be an int. I 
would split the line in two so you know which part of it is generating 
the error, then insert a print statement to give you some more data.

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to