[GRASS-dev] [GRASS GIS] #3517: UnicodeDecodeError in OnRenderDone (core/render.py)

GRASS GIS trac at osgeo.org
Sat Mar 17 10:12:06 PDT 2018


#3517: UnicodeDecodeError in OnRenderDone (core/render.py)
-------------------------+-------------------------
 Reporter:  marisn       |      Owner:  grass-dev@…
     Type:  defect       |     Status:  new
 Priority:  minor        |  Milestone:  7.4.1
Component:  wxGUI        |    Version:  svn-trunk
 Keywords:               |        CPU:  Unspecified
 Platform:  Unspecified  |
-------------------------+-------------------------
 One of my students entered a wrong text as a map name in d.legend. Instead
 of just getting an error, this action messes up wxGUI. Observed on Linux
 (UTF-8 based locale) and Windows (Windows-1257 based locale).

 To test, enter "āšņļ" into d.legend as a raster name.
 {{{
 Traceback (most recent call last):
   File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
 gnu/gui/wxpython/gui_core/goutput.py", line 472, in
 OnCmdOutput

 self.cmdOutput.AddStyledMessage(message, type)
   File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
 gnu/gui/wxpython/gui_core/goutput.py", line 771, in
 AddStyledMessage

 self.AddTextWrapped(message, wrap=None)
   File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
 gnu/gui/wxpython/gui_core/goutput.py", line 720, in
 AddTextWrapped

 txt = EncodeString(txt)
   File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
 gnu/gui/wxpython/core/gcmd.py", line 99, in EncodeString

 return string.encode(_enc)
 UnicodeDecodeError
 :
 'ascii' codec can't decode byte 0xc4 in position 13: ordinal
 not in range(128)
 Traceback (most recent call last):
   File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
 gnu/gui/wxpython/core/gthread.py", line 117, in OnDone

 event.ondone(event)
   File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
 gnu/gui/wxpython/core/render.py", line 434, in OnRenderDone

 (self.layer, event.ret, time.time() - self._startTime))
 UnicodeDecodeError
 :
 'ascii' codec can't decode byte 0xc4 in position 33: ordinal
 not in range(128)
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3517>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list