"""
from grass.pygrass.modules.shortcuts import raster as r
r.report(map = 'r_ndvi', units = 'c,p,h')
"""
produces an error
Traceback (most recent call last):
File "/home/martin/bin/grass/ndvi.py", line 34, in <module>
r.report(map = 'r_ndvi', units = 'c,p,h')
File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/pygrass/modules/interface/module.py",
line 342, in __call__
self.inputs[key].value = val
File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/pygrass/modules/interface/parameter.py",
line 115, in _set_value
(self.name, self.values))
ValueError: The Parameter <units>, must be one of: ['mi', 'me', 'k',
'a', 'h', 'c', 'p']
Is it a bug in pyGRASS or I am wrong? Thanks, Martin
On Thu, Oct 17, 2013 at 11:34 AM, Martin Landa <landa.martin@gmail.com> wrote:
Is it a bug in pyGRASS or I am wrong?
Thank you for using and testing...
It is working, at least on my pc. The pygrass Module interface require
tu give a python list if you have a multiple parameter, so your code
should work writing:
{{{
from grass.pygrass.modules.shortcuts import raster as r