[GRASS-dev] Resolved - Error in GRASS GIS 7.0 database
Markus Metz
markus.metz.giswork at gmail.com
Tue Nov 25 06:59:03 PST 2014
On Tue, Nov 25, 2014 at 3:44 PM, Erick Opiyo <osgis.dev at gmail.com> wrote:
> After the upgrade to grass 7.1.svn(2014)-r62856
>
> Most of my initial python scripts can't run, I get the error below.
g.mlist no longer exists, it has been renamed to g.list. Same for
g.mremove -> g.remove.
>
> Traceback (most recent call last):
> File "phenology/cloud_filter/grass_modis_filter_MODIS.py", line 13, in
> <module>
> l = dict.keys(g.parse_command("g.mlist",type="rast"))
> File "/usr/local/grass-7.1.svn/etc/python/grass/script/core.py", line 465,
> in parse_command
> res = read_command(*args, **kwargs)
> File "/usr/local/grass-7.1.svn/etc/python/grass/script/core.py", line 422,
> in read_command
> process = pipe_command(*args, **kwargs)
> File "/usr/local/grass-7.1.svn/etc/python/grass/script/core.py", line 397,
> in pipe_command
> return start_command(*args, **kwargs)
> File "/usr/local/grass-7.1.svn/etc/python/grass/script/core.py", line 358,
> in start_command
> return Popen(args, **popts)
> File "/usr/local/grass-7.1.svn/etc/python/grass/script/core.py", line 62,
> in __init__
> subprocess.Popen.__init__(self, args, **kwargs)
> File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
> errread, errwrite)
> File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
> raise child_exception
> OSError: [Errno 2] No such file or directory
>
> I guess, the command g.parse_command is no longer valid in grass 7.1.
No, it is g.mlist that causes the problem. This is true for GRASS 7.0 and 7.1
Markus M
I have
> see in some forums, reference to a new grass python module pygrass.
>
> I assume this is now the default interface of python to grass. I will go
> through it and see if I can refactor my codes to use pygrass.
>
> Thanks
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
More information about the grass-dev
mailing list