On 19/11/12 11:42, Nikos Alexandris wrote:
Hi all!

Using "v.db.dropcolumn" within from latest "grass_trunk",

I wonder why the "layer" parameter in "v.db.dropcolumn" is required to be a
string as stated in an error message while trying to run a py-grass script:

--%<---
File "/geo/osgeo/src/grass_trunk/dist.x86_64-unknown-linux-
gnu/etc/python/grass/pygrass/modules/__init__.py", line 466, in __call__
     self.inputs[key].value = val

   File "/geo/osgeo/src/grass_trunk/dist.x86_64-unknown-linux-
gnu/etc/python/grass/pygrass/modules/__init__.py", line 182, in _set_value
     raise TypeError(str_err % (self.name, self.typedesc, type(value)))

TypeError: The Parameter<layer>, require: string, get:<type 'int'>  instead
-->%---

Shouldn't the "layer" parameter be simply an integer?

In GRASS7 you can name layers, which is used particularly for the direct OGR access. As the man page for v.db.dropcolumn says:

"layer=string [required]
    Layer number or name
    A single vector map can be connected to multiple database tables.
    This number determines which table to use. When used with direct
    OGR access this is the layer name."


Moritz
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to