[GRASS-user] PyGRASS: No such file or directory using Module

Markus Neteler neteler at osgeo.org
Thu Jun 23 10:08:53 PDT 2016


On Tue, Jun 21, 2016 at 8:20 AM, Luí­s de Sousa
<luis.de.sousa at protonmail.ch> wrote:
> Hello everyone,
>
> I am trying to use PyGRASS following the example scripts at the Wiki:
> https://grasswiki.osgeo.org/wiki/GRASS_and_Python#pygrass_Library
>
> But on each call to the Module method I get a "No such file or directory"
> error (reproduced below). This is an issue with the call to Popen, but I can
> not tell if its related to this method itself or to the GRASS modules.
>
> Any ideas on what may be going wrong? Thank you,
>
> Luís
>
>
> OSError error(2): No such file or directory
> Traceback (most recent call last):
>   File "/home/desouslu/git/pywps-4-demo/processes/pygrass-demo4.py", line
> 29, in <module>
>     ogrimport = Module('v.in.ogr')
>   File
> "/usr/lib/grass70/etc/python/grass/pygrass/modules/interface/module.py",
> line 466, in __init__
>     raise GrassError(str_err % self.name)
> grass.exceptions.GrassError: Error running: `v.in.ogr
> --interface-description`.


Are you running this in a GRASS GIS session? Technically that is not
much more than setting some environment variables (see Wiki).

Markus


More information about the grass-user mailing list