[GRASS-dev] [GRASS GIS] #3340: wxGUI: encoding error when saving a workspace with vector that has accents in legend_label

GRASS GIS trac at osgeo.org
Sat Apr 29 02:56:12 PDT 2017


#3340: wxGUI: encoding error when saving a workspace with vector that has accents
in legend_label
--------------------------+------------------------------------
  Reporter:  mlennert     |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  normal       |  Milestone:  7.2.2
 Component:  wxGUI        |    Version:  svn-trunk
Resolution:               |   Keywords:  legend_label workspace
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+------------------------------------

Comment (by marisn):

 Replying to [comment:3 mlennert]:
 > Works great. Thanks for the quick fix !

 Sort of. Related issue seems to be #3275
 I tested various text elements and managed to save workspace just fine,
 still loading fails, although the error might come form a different area
 (I'll attach file for testing):
 {{{
 Traceback (most recent call last):
   File "dist.x86_64-pc-linux-gnu/gui/wxpython/lmgr/frame.py", line 1362,
 in
 OnWorkspaceOpen

 self.LoadWorkspaceFile(filename)
   File "dist.x86_64-pc-linux-gnu/gui/wxpython/lmgr/frame.py", line 1512,
 in
 LoadWorkspaceFile

 mapdisplay[i].AddBarscale(overlay['cmd'])
   File "dist.x86_64-pc-linux-gnu/gui/wxpython/mapdisp/frame.py", line
 1224, in
 AddBarscale

 cmd, completed=(self.GetOptData, None, None))
   File "dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/forms.py", line
 2890, in
 ParseCommand

 get_dcmd=get_dcmd, layer=layer)
   File "dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/forms.py", line
 534, in __init__

 frame=self)
   File "dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/forms.py", line
 1313, in __init__

 win.SetValue(str(value))
 UnicodeEncodeError
 :
 'ascii' codec can't encode characters in position 0-6:
 ordinal not in range(128)
 }}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3340#comment:4>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list