[GRASS-dev] [Qgis-developer] New GRASS plugin: a test drive

Vaclav Petras wenzeslaus at gmail.com
Wed Oct 7 07:46:28 PDT 2015


On Tue, Oct 6, 2015 at 7:29 AM, Radim Blazek <radim.blazek at gmail.com> wrote:

> On Mon, Oct 5, 2015 at 11:16 PM, Vaclav Petras <wenzeslaus at gmail.com>
> wrote:
> >
> > On Mon, Oct 5, 2015 at 1:16 PM, Radim Blazek <radim.blazek at gmail.com>
> wrote:
> >>
> >> >> There is v.build.all in modules.
> >> >
> >> > yes, but the user has no hint about its necessity; further steps:
> >> > db.connect -d
> >> > v.db.reconnect.all -cd
> >> > are not available among modules (BTW, maybe these options could be
> added
> >> > to existing modules?).
> >>
> >> Building broken topology from browser can be always useful, but I
> >> don't think that browser/plugin must have UI for upgrading GRASS data
> >> from 6 to 7, something which has to be rarely done and which should be
> >> done with understanding (upgrade from dbf to sqlite).
> >
> > Perhaps a special plugin. Do you think it would be a good idea to have
> > plugins based on the GRASS plugin? (They would probably just call modules
> > but in the way GRASS plugin does.)
>
> I have added qgis.v.upgrade.py which runs
>   v.build.all
>   db.connect -d
>   v.db.reconnect.all -cd
>
> but v.db.reconnect.all fails with -d even from GRASS shell:
>
> Reconnecting vector map <lines at upgrade> (1 of 3)...
>
> --------------------------------------------------------------------------------
> Copying table <lines> to target database...
> Traceback (most recent call last):
>   File "grass-7.1.svn/scripts/db.droptable", line 99, in <module>
>     main()
>   File "grass-7.1.svn/scripts/db.droptable", line 77, in main
>     used = grass.db.db_table_in_vector(table)
>   File "grass-7.1.svn/etc/python/grass/script/db.py", line 189, in
> db_table_in_vector
>     for f in vector_db(vect, stderr=nuldev).itervalues():
>   File "grass-7.1.svn/etc/python/grass/script/vector.py", line 46, in
> vector_db
>     **args)
>   File "/grass-7.1.svn/etc/python/grass/script/core.py", line 460, in
> read_command
>     return handle_errors(returncode, stdout, args, kwargs)
>   File "grass-7.1.svn/etc/python/grass/script/core.py", line 328, in
> handle_errors
>     returncode=returncode)
> grass.exceptions.CalledModuleError: Module run None ['v.db.connect',
> '--q', '-g', 'map=edit at PERMANENT', 'sep=;'] ended with error
> Process ended with non-zero return code 1. See errors in the (error)
> output.
> ERROR: Unable to drop table <lines>


Hi Radim,

it works for me with NC sample Location for G6 [1]. So, the same as for
Paolo [2]. How can I reproduce it? I've tried vector map without a table,
but it also worked well. Tested with latest 7.0 release branch code.

Vaclav

[1] http://grass.osgeo.org/download/sample-data/
[2] https://lists.osgeo.org/pipermail/grass-dev/2015-October/076648.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20151007/8b04ec60/attachment.html>


More information about the grass-dev mailing list