[GRASS-dev] [GRASS GIS] #227: various error messges during digitizing

#227: various error messges during digitizing
----------------------+-----------------------------------------------------
Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Keywords: | Platform: Linux
      Cpu: x86-64 |
----------------------+-----------------------------------------------------
As I digitise in vdigit in GRASS 6 SVN r32162, following various error
messages are printed:

{{{
Traceback (most recent call last):
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/ma
pdisp.py", line 972, in MouseActions

self.OnRightUp(event)
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/ma
pdisp.py", line 1681, in OnRightUp

action="add")
   File
"/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/dbm.py",
line 2738, in __init__

self.UpdateDialog(query, cats, line)
   File
"/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/dbm.py",
line 2966, in UpdateDialog

if len(columns["cat"]['values']) == 0: # no cats
KeyError
:
'cat'
Traceback (most recent call last):
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/ma
pdisp.py", line 972, in MouseActions

self.OnRightUp(event)
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/ma
pdisp.py", line 1681, in OnRightUp

action="add")
   File
"/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/dbm.py",
line 2738, in __init__

self.UpdateDialog(query, cats, line)
   File
"/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/dbm.py",
line 2966, in UpdateDialog

if len(columns["cat"]['values']) == 0: # no cats
KeyError
:
'cat'
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/227&gt;
GRASS GIS <http://grass.osgeo.org>

#227: various error messges during digitizing
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: martinl
      Type: defect | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords: attributes, key column
  Platform: Linux | Cpu: x86-64
-----------------------+----------------------------------------------------
Changes (by martinl):

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

Comment:

Seems that the linked attribute table has key column different from "cat".
I have fixed it in trunk/devbr6, r32166/r32167.

Helps?

Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/227#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#227: various error messges during digitizing
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: martinl
      Type: defect | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords: attributes, key column
  Platform: Linux | Cpu: x86-64
-----------------------+----------------------------------------------------
Comment (by msieczka):

The r32166/r32167 fix is cool itself, but it does not fix the given issue.
I'm attaching a sample location to reproduce the error.

1. enter the location, mapset test

2. add vector map "testit" to the list

3. start editing it, digitize a point - error is printed:

{{{
Traceback (most recent call last):
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/ma
pdisp.py", line 972, in MouseActions

self.OnRightUp(event)
   File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/ma
pdisp.py", line 1681, in OnRightUp

action="add")
   File
"/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/dbm.py",
line 2738, in __init__

self.UpdateDialog(query, cats, line)
   File
"/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/dbm.py",
line 2973, in UpdateDialog

if len(columns[key]['values']) == 0: # no cats
KeyError
:
'cat'
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/227#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#227: various error messges during digitizing
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: martinl
      Type: defect | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords: attributes, key column
  Platform: Linux | Cpu: x86-64
-----------------------+----------------------------------------------------
Comment (by martinl):

Replying to [comment:2 msieczka]:
> The r32166/r32167 fix is cool itself, but it does not fix the given
issue. I'm attaching a sample location to reproduce the error.

Now hopefully fixed in trunk and devbr6, r32176/r32177.

The linked table contains uppercase column names. Problem is that
v.db.connect -p/g returns key column name lowercase. I fixed it in wxGUI.
In GRASS7 maybe it could be fixed in Vlib.

Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/227#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#227: various error messges during digitizing
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: martinl
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: fixed | Keywords: attributes, key column
  Platform: Linux | Cpu: x86-64
-----------------------+----------------------------------------------------
Changes (by martinl):

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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/227#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>