<div>The error occurs here:</div>
<div>area[ix,iy]=gridarea</div>
<div>&nbsp;</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&#39;t a problem before and it&#39;s not a problem for ix???
</div>
<div>&nbsp;</div>
<div>Thanks! </div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div><span class="gmail_quote">On 9/13/07, <b class="gmail_sendername">Kent Johnson</b> &lt;<a href="mailto:kent37@tds.net">kent37@tds.net</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">John wrote:<br>&gt; I&#39;ve written a program which calculates areas of grid cells distributed<br>&gt; over the globe. It works fine with Python 
2.5, however, when I run it<br>&gt; with 2.4 (the Enthon edition) I get the following error:<br>&gt;<br>&gt; OverflowError: long int too large to convert to int<br>&gt;<br>&gt; It occurs on this line:<br>&gt;<br>&gt;&nbsp;&nbsp;for ix in range(nx): area[ix,iy]=gridarea
<br>&gt;<br>&gt; I have no idea which int it&#39;s referring to? The values of ix/nx will not<br>&gt; exceed 360, iy will not exceed 180. Any suggestions on what to change<br>&gt; 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