Opened 16 years ago

Closed 16 years ago

#227 closed defect (fixed)

various error messges during digitizing

Reported by: msieczka Owned by: martinl
Priority: major Milestone: 6.4.0
Component: wxGUI Version: svn-develbranch6
Keywords: attributes, key column Cc: grass-dev@…
CPU: x86-64 Platform: Linux

Description

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'

Attachments (1)

exmp_loc.tar.bz2 (8.0 KB ) - added by msieczka 16 years ago.
example data to reproduce the error

Download all attachments as: .zip

Change History (5)

comment:1 by martinl, 16 years ago

Cc: grass-dev@… added
Keywords: attributes key column added
Owner: changed from grass-dev@… to martinl
Status: newassigned

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

Helps?

Martin

comment:2 by msieczka, 16 years ago

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
  1. add vector map "testit" to the list
  1. 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'

by msieczka, 16 years ago

Attachment: exmp_loc.tar.bz2 added

example data to reproduce the error

in reply to:  2 comment:3 by martinl, 16 years ago

Replying to 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

comment:4 by martinl, 16 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.