[GRASS-user] [Fwd: broken db.dropcolumn in grass_trunk?]

Martin Landa landa.martin at gmail.com
Mon Oct 12 14:46:39 EDT 2009


Hi,

2009/10/12 Nikos Alexandris <nikos.alexandris at felis.uni-freiburg.de>:

> Traceback (most recent call last):
>  File
> "/geo/osgeo/src/grass_trunk/dist.x86_64-unknown-linux-gnu/scripts/db.dropcolumn", line 117, in <module>
>    main()
>  File
> "/geo/osgeo/src/grass_trunk/dist.x86_64-unknown-linux-gnu/scripts/db.dropcolumn", line 72, in main
>    cols = [f[0] for f in grass.db_describe()['cols']]
> TypeError: db_describe() takes exactly 1 argument (0 given)
> -%<--
>
> Shouldn't the "grass.db_describe()" [2] command fed with an argument
> (e.g. the "table" string [1])? Not sure though since I am very beginner
> with Python.

yes, see [1].

> [1] cat -n db.dropcolumn.py | grep 'table = options'
> 54          table = options['table']
>
> [2] cat -n db.dropcolumn.py | grep grass.db_describe
>    72      cols = [f[0] for f in grass.db_describe()['cols']]
>    87          for f in grass.db_describe()['cols']:

fixed in r39493 (untested).

Martin

[1] http://download.osgeo.org/grass/grass7_progman/namespacepython_1_1db.html#f874bd835539375c6123d648db203a74

-- 
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa


More information about the grass-user mailing list