[GRASS-user] Sqlite error when calling GRASS GIS outside of GRASS

Moritz Lennert mlennert at club.worldonline.be
Fri Aug 7 02:53:39 PDT 2020


Hi Ellen,

Am 6. August 2020 22:03:24 MESZ schrieb "DAmico, Ellen" <DAmico.Ellen at epa.gov>:
>Good Afternoon,
>I have been going around in circles with this error.
>When I run this piece of code:
>g.run_command(r'C:\OSGeo4W64\apps\grass\grass78\bin\g.proj.exe',
>georef=geotiff, location = locationGeonet)
>I am getting this error:
>Process ended with non-zero return code 3221225785. See errors in the
>(error)
>
>When I run that g.proj.exe directly I get the dynamic link error.
>
>I think this is a conflict with the sqlite3.dll as is suggested the
>below wiki but the solutions there have not worked for me.
>https://grasswiki.osgeo.org/wiki/WinGRASS_errors
>
>I am wondering if it might have something to do with not having
>administrative rights to my machine.  I can access my path variables
>through Spyder/ Anaconda but not directly through the usual channels. 
>I am on a windows machine.
>

First of all, there are a series of variables you have to define before you can call a module without starting GRASS GIS explicitly. See [1] or use the exec parameter of the grass command.

Second, when using the functions in the grass scripting library (e.g. run_command), you should not provide a path, but just the module name, i.e.

g.run_command('g.proj', georef=geotiff, location = locationGeonet)

Moritz

[1] https://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly


More information about the grass-user mailing list