[FWTools] Python bindings to OGR

Cecília Cerdeira ccerdeira at gmail.com
Tue Sep 28 07:41:57 EST 2010


The script python already has the command

from osgeo import ogr

When I call it from the OSGeo4W shell, I get this message error:

E:\test_shp>pylas.py -i 32-2-502-114-23.las -o 32-output.shp > log.txt

Traceback (most recent call last):

  File "E:\test_shp\pylas.py", line 43, in <module>

    from osgeo import ogr

  File "C:\OSGeo4W\apps\gdal-dev\pymod\osgeo\__init__.py", line 21, in
<module>

    _gdal = swig_import_helper()

  File "C:\OSGeo4W\apps\gdal-dev\pymod\osgeo\__init__.py", line 17, in
swig_impo

rt_helper

    _mod = imp.load_module('_gdal', fp, pathname, description)

ImportError: DLL load failed: The operating system cannot run %1.

What I am doing wrong?


2010/9/28 David Fawcett <david.fawcett at gmail.com>

> Try:
>
> from osgeo import ogr
>
> David
>
>
>
> On Sep 28, 2010, at 6:57 AM, Cecília Cerdeira <ccerdeira at gmail.com> wrote:
>
> > Hi,
> >
> > I am trying to run a python script in OSGeo4W shell that needs the python
> bindings to OGR.
> >
> > Anyone knows how to set this?
> >
> > Thanks
> >
> > Cecília
> > _______________________________________________
> > FWTools mailing list
> > FWTools at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/fwtools
> > http://fwtools.maptools.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20100928/148d383d/attachment.htm 


More information about the FWTools mailing list