[GRASS-dev] [GRASS GIS] #1249: unexpected error from the wxguy using "show attribute table" from the toolbar.

#1249: unexpected error from the wxguy using "show attribute table" from the
toolbar.
--------------------+-------------------------------------------------------
Reporter: met | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.1
Component: wxGUI | Version: svn-releasebranch64
Keywords: phyton | Platform: MSWindows XP
      Cpu: x86-32 |
--------------------+-------------------------------------------------------
from GRASS GIS Layer Manager selecting "Show attribute table" from
the toolbar, if database name contains ":" (like win/dos unit name)
,the program crashes.

We now report an example with the command db.connect in which the cause of
the error discussed shows itself.

--------example---------

db.connect -p
driver:sqlite
database:D:\GIS_db\websir\parma\settembre.db
schema:
group:

v.db.connect -p map=settembre@parma
Vector map <settembre@parma> is connected by:
layer <2> table <NODES> in database <D:\GIS_db\websir\parma\settembre.db>
through driver <sqlite> with key <cat>
layer <1> table <LINKS> in database <D:\GIS_db\websir\parma\settembre.db>
through driver <sqlite> with key <cat>

"D:\GRASSS\GRASS-64-SVN\etc\wxpython\gui_modules\dbm.py",
line 2353, in __init__

item, value = line.split(':')
ValueError
:
too many values to unpack

item, value = line.split(':')

-----------------------------------------------------

  command type "connect" contains
'driver:sqlite\ndatabase:D:\\GIS_db\\websir\\parma\\settembre.db\nschema:\ngroup:\n'
<type 'str'>

and when line contains 'database:D:\\GIS_db\\websir\\parma\\settembre.db'
line.split(':') restitutes 3 values instead of 2!!

solution:
in .\etc\wxpython\gui_modules\dbm.py line 2353 substitute
item, value = line.split(':')
with
item, value = line.split(':',1)

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

#1249: unexpected error from the wxguy using "show attribute table" from the
toolbar.
-------------------------------------+--------------------------------------
Reporter: met | Owner: martinl
     Type: defect | Status: assigned
Priority: normal | Milestone: 6.4.1
Component: wxGUI | Version: svn-releasebranch64
Keywords: attribute table manager | Platform: MSWindows XP
      Cpu: x86-32 |
-------------------------------------+--------------------------------------
Changes (by martinl):

* cc: grass-dev@… (added)
  * keywords: phyton => attribute table manager
  * status: new => assigned
  * owner: grass-dev@… => martinl

Comment:

Fixed in r44687.

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

#1249: unexpected error from the wxguy using "show attribute table" from the
toolbar.
---------------------------+------------------------------------------------
  Reporter: met | Owner: martinl
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.1
Component: wxGUI | Version: svn-releasebranch64
Resolution: fixed | Keywords: attribute table manager
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Changes (by martinl):

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

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