Hi,

2014-10-22 10:49 GMT+02:00 Martin Landa <landa.mar...@gmail.com>:
> it's seems that currently PyGRASS doesn't support shorten parameters, eg.

there is also another issue where pyGRASS seems to be too much strict, eg.

    Module('d.vect', map='p6', type='point', color='purple',
icon='basic/star', size=10)

fails with

File "./u01.py", line 37, in compute
    Module('d.vect', map='p6', type='point', color='purple',
icon='basic/star', size=10)
  File 
"/opt/src/grass70_release/dist.x86_64-unknown-linux-gnu/etc/python/grass/pygrass/modules/interface/module.py",
line 347, in __init__
    self.__call__(*args, **kargs)
  File 
"/opt/src/grass70_release/dist.x86_64-unknown-linux-gnu/etc/python/grass/pygrass/modules/interface/module.py",
line 387, in __call__
    self.inputs[key].value = val
  File 
"/opt/src/grass70_release/dist.x86_64-unknown-linux-gnu/etc/python/grass/pygrass/modules/interface/parameter.py",
line 141, in _set_value
    raise TypeError(str_err % (self.name, self.typedesc, type(value)))
TypeError: The Parameter <size>, require: float, get: <type 'int'> instead

The reason is that pyGRASS expects 'size' given as a float and not
integer. PyGRASS should do casting in this case automatically. Martin

-- 
Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to