<div>The error occurs here:</div>
<div>area[ix,iy]=gridarea</div>
<div> </div>
<div>The values of nx, ix, iy leading up to the error are:</div>
<div>360 0 0<br>360 1 0<br>360 2 0<br>360 3 0<br>360 4 0</div>
<div>360 ... ...<br>360 357 9<br>360 358 9<br>360 359 9<br>360 0 10<br>OverflowError: long int too large to convert to int<br><br>I guess then the problem occurs when iy goes from 9 to 10, but why?? It wasn't a problem before and it's not a problem for ix???
</div>
<div> </div>
<div>Thanks! </div>
<div> </div>
<div> </div>
<div><span class="gmail_quote">On 9/13/07, <b class="gmail_sendername">Kent Johnson</b> <<a href="mailto:kent37@tds.net">kent37@tds.net</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">John wrote:<br>> I've written a program which calculates areas of grid cells distributed<br>> over the globe. It works fine with Python
2.5, however, when I run it<br>> with 2.4 (the Enthon edition) I get the following error:<br>><br>> OverflowError: long int too large to convert to int<br>><br>> It occurs on this line:<br>><br>> for ix in range(nx): area[ix,iy]=gridarea
<br>><br>> I have no idea which int it's referring to? The values of ix/nx will not<br>> exceed 360, iy will not exceed 180. Any suggestions on what to change<br>> for the backward compatability?<br><br>Are you sure nx is not large? The argument to range() must be an int. I
<br>would split the line in two so you know which part of it is generating<br>the error, then insert a print statement to give you some more data.<br><br>Kent<br></blockquote></div><br><br clear="all"><br>-- <br>Configuration
<br>``````````````````````````<br>Plone 2.5.3-final,<br>CMF-1.6.4,<br>Zope (Zope 2.9.7-final, python 2.4.4, linux2),<br>Five 1.4.1,<br>Python 2.4.4 (#1, Jul 3 2007, 22:58:17) [GCC 4.1.1 20070105 (Red Hat 4.1.1-51)],<br>PIL
1.1.6