[GRASSGUI] commands from menus and database table not working

Jachym Cepicky jachym.cepicky at gmail.com
Mon May 21 06:14:10 EDT 2007


hi,

after some weeks, I'm back from the middle of nowhere and I tried some
new features of your wx gui.

It looks good, however, no commands are working now: 

1 - start the gui
	wxgrass &
2 - Select Raster-> Reports and statistics -> Report basic file
information

3 - Fill the form

4 - Hint "Run" button:

Result:

Traceback (most recent call last):
  File "/usr/src/gis/grass/addons/gui/gui_modules/menuform.py", line
619, in OnRun
    self.goutput.runCmd(cmd)
  File "/usr/src/gis/grass/addons/gui/gui_modules/wxgui_utils.py", line
922, in runCmd
    self.cmd_output.write("$ " + command + "\n")
TypeError: cannot concatenate 'str' and 'list' objects

Why:

method getCmd() of grassTask() class (gui_modules/menform.py, line 215)
returns not command string (e.g. "r.info elevation.dem"), but already
command list (e.g. ["r.info", "map=elevation.dem"]).

This is in conflict with rest of the code, where ever cmd.split(" ") is
called (e.g. wxgui.py line 410 or gui_modules/wxgui_utils.py, line 868).

So, what to do? Fix getCmd(), so it returns string or go through whole
code and try to fix all cmd.split() calls?

Jachym		
-- 
Jachym Cepicky
e-mail: jachym.cepicky at gmail.com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub





More information about the grass-gui mailing list