The user was running the script from the FWTools shell. <br><br>After further investigation, it sounds like the user had copied many of the python modules and possibly the python executable into the same directory as the script in question. In addition to FWTools, he also has the python interpreter that comes with ArcGIS.
<br><br>When he moved the script to its own empty directory, the script ran successfully from the FWTools shell. <br><br>Sounds like the wrong python interpreter was being used. <br><br>As always, thanks a lot Frank.<br>
<br>David.<br> <br><div><span class="gmail_quote">On 12/4/06, <b class="gmail_sendername">Frank Warmerdam</b> <<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
David Fawcett wrote:<br>> I have a script that I wrote using the ogr and osr python modules.<br>> Everything runs great when I run it, but I have a user in one of our<br>> other offices who keeps getting an error message. I can't replicate it
<br>> using his data on my install.<br>><br>> He is running version 1.0.7 (Windows), I suspected that it could be a<br>> version thing, so I uninstalled mine and installed 1.0.7.<br>><br>> The script reads X and Y values from a .csv file and writes out a
<br>> shapefile.<br>><br>> Here is the error that he is getting:<br>><br>> D:\GIS Scripts>python csv2shp.py input=D:\convert\<br>><br>> Traceback (most recent call last):<br>> File "csv2shp.py
", line 8, in ?<br>> import os, ogr, sys, datetime, osr<br>><br>> OverflowError: ('integer literal too large',<br>> ('c:\\progra~1\\fwtool~1.7\\pymod\\<br>><br>> ogr.py', 257, None, 'wkb25Bit = -2147483648 # 0x80000000\n'))
<br>...<br>> I don't expect anyone to debug my script, I am just hoping that you can<br>> tell me what cases might lead to this error.<br><br>David,<br><br>Is there any chance your user is not running your script in an FWTools
<br>shell or is for some other reason not getting the right Python?<br><br>The problem appears to be support for very large constants in the python<br>script (in line 257 of ogr.py) and I could imagine this varying across
<br>versions of python. But I can't imagine it working differently with<br>the FWTools python on different machines.<br><br>Best regards,<br>--<br>---------------------------------------+--------------------------------------
<br>I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a><br>light and sound - activate the windows | <a href="http://pobox.com/~warmerdam">http://pobox.com/~warmerdam
</a><br>and watch the world go round - Rush | President OSGeo, <a href="http://osgeo.org">http://osgeo.org</a><br><br></blockquote></div><br>