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

GRASS GIS trac at osgeo.org
Thu Dec 23 09:24:17 EST 2010


#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 at parma
 Vector map <settembre at 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>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list