[GRASS-dev] Re: [GRASS GIS] #1293: Creating mapset with non-latin letter gives python ascii error

GRASS GIS trac at osgeo.org
Thu Mar 3 15:55:52 EST 2011


#1293: Creating mapset with non-latin letter gives python ascii error
-------------------------+--------------------------------------------------
 Reporter:  marisn       |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:  6.4.1                    
Component:  wxGUI        |     Version:  6.4.1 RCs                
 Keywords:               |    Platform:  MSWindows Vista          
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------

Comment(by marisn):

 Another place, that fails: g.help

 {{{
 Traceback (most recent call last):
   File "c:/osgeo4w/usr/src/grass-6.4.1RC1/dist.i686-pc-
 mingw32/etc/wxpython/gui_modules/prompt.py", line 777, in
 OnItemSelected
   File "C:\Program
 Files\GRASS-64\etc\wxpython\gui_modules\menuform.py", line
 2022, in ParseInterface

 tree = etree.fromstring(getInterfaceDescription(cmd[0]))
   File "C:\Program
 Files\GRASS-64\etc\wxpython\gui_modules\menuform.py", line
 1975, in getInterfaceDescription

 "Details: %s") % (cmd, cmderr)
 UnicodeDecodeError
 :
 'ascii' codec can't decode byte 0xd0 in position 30: ordinal
 not in range(128)

 }}}

 And afterwards things are going only downhill from there. Starting a new
 GRASS WXGUI session greets with python crash and skipping of startup
 screen:

 {{{
 KŽ█DA:KARąU KOPA ┼Īaurslie┼Šu dzelzce─╝┼Ī nav atrasta
 C:/Program Files/GRASS-64/etc/wxpython/gis_set.py:623: UnicodeWarning:
 Unicode e
 qual comparison failed to convert both arguments to Unicode - interpreting
 them
 as being unequal
   if mapset not in self.listOfMapsetsSelectable or \
 Traceback (most recent call last):
   File "C:/Program Files/GRASS-64/etc/wxpython/gis_set.py", line 858, in
 <module
 >
     GRASSStartUp = StartUp(0)
   File "C:\OSGeo4W\apps\Python25\lib\site-packages\wx-2.8-msw-
 unicode\wx\_core.p
 y", line 7935, in __init__
   File "C:\OSGeo4W\apps\Python25\lib\site-packages\wx-2.8-msw-
 unicode\wx\_core.p
 y", line 7509, in _BootstrapApp
   File "C:/Program Files/GRASS-64/etc/wxpython/gis_set.py", line 829, in
 OnInit
     StartUp = GRASSStartup()
   File "C:/Program Files/GRASS-64/etc/wxpython/gis_set.py", line 166, in
 __init_
 _
     self._set_properties()
   File "C:/Program Files/GRASS-64/etc/wxpython/gis_set.py", line 241, in
 _set_pr
 operties
     (utils.UnicodeString(mapset))
   File "C:\Program Files\GRASS-64\etc\wxpython\gui_modules\utils.py", line
 669,
 in UnicodeString
     return unicode(string, enc)
   File "C:\Program Files\GRASS-64\Python25\lib\encodings\cp1257.py", line
 15, in
  decode
     return codecs.charmap_decode(input,errors,decoding_table)
 UnicodeDecodeError: 'charmap' codec can't decode byte 0xa1 in position 1:
 charac
 ter maps to <undefined>
 }}}

 Contents of .grassrc6 ("šaursliežu dzelzceļš" is a mapset in location
 "spearfish60" and not "demo"):

 {{{
 GISDBASE: C:\Users\tests\Documents\GIS_DataBase
 LOCATION_NAME: demolocation
 MAPSET: šaursliežu dzelzceļš
 GRASS_GUI: wxpython
 MAPSET : PERMANENT
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/1293#comment:2>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list