[GRASS-dev] wxGUI d.vect error

Hi,
I think there has been something wrong in the recent revisions of grass
6.5.0, with d.vect and the "where=" clause.

When I try to display a vector with a where condition (e.g.
where='code=2'), the display is not updated as expected and the
following message is displayed :
        
        Traceback (most recent call last):
          File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/me
        nuform.py", line 765, in OnOK
        
        cmd = self.OnApply(event)
          File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/me
        nuform.py", line 777, in OnApply
        
        self)
          File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/wx
        gui_utils.py", line 1276, in GetOptData
        
        self.ChangeLayer(layer)
          File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/wx
        gui_utils.py", line 1369, in ChangeLayer
        
        l_active=chk, l_hidden=hidden, l_opacity=opac,
        l_render=False)
          File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/re
        nder.py", line 1095, in ChangeLayer
        
        layer.SetCmd(kargs['command'])
          File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/re
        nder.py", line 315, in SetCmd
        
        self.cmd = utils.CmdToTuple(cmd)
          File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/ut
        ils.py", line 348, in CmdToTuple
        
        key, value = item.split('=')
        ValueError
        :
        too many values to unpack
        
(Requesting the same thing in a X monitor, entering the d.vect command
at the grass prompt gives a fine result).

Bye,
Vincent

Hi,

2009/4/1 Vincent Bain <bain@toraval.fr>:

[...]

   self\.cmd  = utils\.CmdToTuple\(cmd\)
     File &quot;/usr/local/grass\-6\.5\.svn/etc/wxpython/gui\_modules/ut
   ils\.py&quot;, line 348, in CmdToTuple

   key, value = item\.split\(&#39;=&#39;\)
   ValueError
   :
   too many values to unpack

fixed in r36557 (devbr6). GRASS 6.4.0 is not affected by this bug.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

Thank you Martin,

VB

Le mercredi 01 avril 2009 à 23:07 +0200, Martin Landa a écrit :

Hi,

2009/4/1 Vincent Bain <bain@toraval.fr>:

[...]

> self.cmd = utils.CmdToTuple(cmd)
> File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/ut
> ils.py", line 348, in CmdToTuple
>
> key, value = item.split('=')
> ValueError
> :
> too many values to unpack
>

fixed in r36557 (devbr6). GRASS 6.4.0 is not affected by this bug.

Martin