[GRASS-user] Sqlite error when calling GRASS GIS outside of GRASS
DAmico, Ellen
DAmico.Ellen at epa.gov
Fri Aug 7 04:55:33 PDT 2020
Hi,
Thanks for the suggestions. I do have the paths set up. Like I said I can only set these through Spyder and not in my path variables directly because I do not have admin privileges to my work machine, I am not sure if this causing problems or not.
If you can give me an example of how you set up the GISRC that might be helpful because perhaps I don't have that set up properly.
I have run through the link you have sent several times already. I was able to run all of the python example codes successfully, except the one for using pygrass. I think would suggest that I don't have the path set up for the library set properly.
I also tried your suggestion about removing the path from the module name. That gave me the exact same error so that is not the issue.
Here is how I have the other paths set up.
[cid:image001.png at 01D66C8F.7C031BF0]
-----Original Message-----
From: Moritz Lennert <mlennert at club.worldonline.be>
Sent: Friday, August 7, 2020 5:54 AM
To: grass-user at lists.osgeo.org; DAmico, Ellen <DAmico.Ellen at epa.gov>; GRASS user list <grass-user at lists.osgeo.org>
Subject: Re: [GRASS-user] Sqlite error when calling GRASS GIS outside of GRASS
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://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgrass
>wiki.osgeo.org%2Fwiki%2FWinGRASS_errors&data=02%7C01%7CDAmico.Ellen
>%40epa.gov%7C92882cdd739146e8807d08d83ab7dae1%7C88b378b367484867acf976a
>acbeca6a7%7C0%7C0%7C637323908615854246&sdata=Prpxv0th3vqxwHUsdAX1jz
>%2BntOjYb0bVZilg6X27Zgc%3D&reserved=0
>
>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://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgrasswiki.osgeo.org%2Fwiki%2FWorking_with_GRASS_without_starting_it_explicitly&data=02%7C01%7CDAmico.Ellen%40epa.gov%7C92882cdd739146e8807d08d83ab7dae1%7C88b378b367484867acf976aacbeca6a7%7C0%7C0%7C637323908615854246&sdata=zV6q3w4yy8c7LjPe866SDikzTm4B3BlB%2BPnZLhaov9s%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20200807/55d3a50b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 10655 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20200807/55d3a50b/attachment-0001.png>
More information about the grass-user
mailing list