[GRASS-dev] [GRASS GIS] #3211: Pygrass crash when trying to drop DB table
GRASS GIS
trac at osgeo.org
Wed Nov 16 13:39:29 PST 2016
#3211: Pygrass crash when trying to drop DB table
----------------------+---------------------------------
Reporter: lrntct | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: PyGRASS | Version: svn-releasebranch72
Resolution: | Keywords:
CPU: x86-64 | Platform: Linux
----------------------+---------------------------------
Comment (by lrntct):
Dropping the table with the command line tool works correctly:
{{{
/usr/lib/grass72/scripts/db.droptable -f table=drainage_network_junction
Forcing ...
(Wed Nov 16 15:29:15 2016) Command finished (4 sec)
}}}
Below is a minimum working example:
{{{
from grass.pygrass.vector import VectorTopo
from grass.pygrass.vector.table import Link
cols = [(u'cat', 'INTEGER PRIMARY KEY'),
(u'name', 'TEXT')]
cols_j = [(u'cat', 'INTEGER PRIMARY KEY'),
(u'junction', 'TEXT')]
with VectorTopo('drop_table_test', mode='w', tab_cols=cols) as vect_map:
l_junc = Link(layer=1, name='link_name',
table=vect_map.name + 'junc', key='cat')
t_junc = l_junc.table()
t_junc.create(cols_j, overwrite=True)
}}}
Just run two times the script to see the error.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3211#comment:1>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list