[GRASS-dev] [GRASS GIS] #109: wxgrass - d.vect and d.vect.chart: changing default checkbox options in GUI results in KeyError

#109: wxgrass - d.vect and d.vect.chart: changing default checkbox options in GUI
results in KeyError
-------------------------------------+--------------------------------------
Reporter: mlennert | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: Python | Version: svn-trunk
Keywords: wxgrass d.vect KeyError |
-------------------------------------+--------------------------------------
The command line for d.vect displayed in properties window of a vector
layer does not correspond to the options displayed by the GUI. E.g. add a
new vector layer and chose a map (I'll use fields@user1 here). The command
line shown at the bottom of the properties window shows d.vect
map=fields@user1. This is fine as it means that for all other options, we
use the default. For the type option, the default is
"point,line,boundary,centroid,area,face" and this is what is shown in the
GUI where all the check boxes are ticked. However, if I uncheck any of
these boxes for the first time, I get the following type of KeyError:

Traceback (most recent call last):
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-
gnu/etc/wxpython/gui_modules/menuform.py", line 1252, in OnCheckBoxMulti

del currentValues[ theValue ]
KeyError
:
u'point'

OR

Traceback (most recent call last):
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-
gnu/etc/wxpython/gui_modules/menuform.py", line 1252, in OnCheckBoxMulti

del currentValues[ theValue ]
KeyError
:
u'shape'

The same happens with the d.vect.chart type options.

Moritz

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/109&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#109: wxgrass - d.vect and d.vect.chart: changing default checkbox options in GUI
results in KeyError
-----------------------+----------------------------------------------------
  Reporter: mlennert | Owner: martinl
      Type: defect | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: Python | Version: svn-trunk
Resolution: | Keywords: wxgrass d.vect KeyError
-----------------------+----------------------------------------------------
Changes (by martinl):

  * status: new => assigned
  * owner: grass-dev@lists.osgeo.org => martinl
* cc: grass-dev@lists.osgeo.org (added)

Comment:

Replying to [ticket:109 mlennert]:
> The command line for d.vect displayed in properties window of a vector
layer does not correspond to the options displayed by the GUI. E.g. add a
new vector layer and chose a map (I'll use fields@user1 here). The command
line shown at the bottom of the properties window shows d.vect
map=fields@user1. This is fine as it means that for all other options, we
use the default. For the type option, the default is
"point,line,boundary,centroid,area,face" and this is what is shown in the
GUI where all the check boxes are ticked. However, if I uncheck any of
these boxes for the first time, I get the following type of KeyError:
>
>
> Traceback (most recent call last):
> File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-
> gnu/etc/wxpython/gui_modules/menuform.py", line 1252, in OnCheckBoxMulti
>
> del currentValues[ theValue ]
> KeyError
> :
> u'point'
>
> OR
>
> Traceback (most recent call last):
> File "/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-
> gnu/etc/wxpython/gui_modules/menuform.py", line 1252, in OnCheckBoxMulti
>
> del currentValues[ theValue ]
> KeyError
> :
> u'shape'
>
> The same happens with the d.vect.chart type options.

It seems to me I have fixed this issue some time ago, see r30478. I tested
d.vect GUI dialog, no !KeyError. ??

Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/109#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#109: wxgrass - d.vect and d.vect.chart: changing default checkbox options in GUI
results in KeyError
-----------------------+----------------------------------------------------
  Reporter: mlennert | Owner: martinl
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: Python | Version: svn-trunk
Resolution: fixed | Keywords: wxgrass d.vect KeyError
-----------------------+----------------------------------------------------
Changes (by mlennert):

  * status: assigned => closed
  * resolution: => fixed

Comment:

Just tried again and cannot reproduce. Don't know what happened...

Closing bug as fixed.

Moritz

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/109#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/