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

Radim Blazek radim.blazek at gmail.com
Tue Oct 6 04:29:52 PDT 2015


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>

Radim


More information about the grass-dev mailing list