[FWTools] Error in ogr.py
David Fawcett
david.fawcett at gmail.com
Mon Dec 4 16:43:15 EST 2006
The user was running the script from the FWTools shell.
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.
When he moved the script to its own empty directory, the script ran
successfully from the FWTools shell.
Sounds like the wrong python interpreter was being used.
As always, thanks a lot Frank.
David.
On 12/4/06, Frank Warmerdam <warmerdam at pobox.com> wrote:
>
> David Fawcett wrote:
> > I have a script that I wrote using the ogr and osr python modules.
> > Everything runs great when I run it, but I have a user in one of our
> > other offices who keeps getting an error message. I can't replicate it
> > using his data on my install.
> >
> > He is running version 1.0.7 (Windows), I suspected that it could be a
> > version thing, so I uninstalled mine and installed 1.0.7.
> >
> > The script reads X and Y values from a .csv file and writes out a
> > shapefile.
> >
> > Here is the error that he is getting:
> >
> > D:\GIS Scripts>python csv2shp.py input=D:\convert\
> >
> > Traceback (most recent call last):
> > File "csv2shp.py", line 8, in ?
> > import os, ogr, sys, datetime, osr
> >
> > OverflowError: ('integer literal too large',
> > ('c:\\progra~1\\fwtool~1.7\\pymod\\
> >
> > ogr.py', 257, None, 'wkb25Bit = -2147483648 # 0x80000000\n'))
> ...
> > I don't expect anyone to debug my script, I am just hoping that you can
> > tell me what cases might lead to this error.
>
> David,
>
> Is there any chance your user is not running your script in an FWTools
> shell or is for some other reason not getting the right Python?
>
> The problem appears to be support for very large constants in the python
> script (in line 257 of ogr.py) and I could imagine this varying across
> versions of python. But I can't imagine it working differently with
> the FWTools python on different machines.
>
> Best regards,
> --
>
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | President OSGeo, http://osgeo.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20061204/7cf7a059/attachment.html
More information about the FWTools
mailing list