Opened 6 years ago

Last modified 5 years ago

#3517 new defect

UnicodeDecodeError in OnRenderDone (core/render.py)

Reported by: marisn Owned by: grass-dev@…
Priority: minor Milestone: 7.4.5
Component: wxGUI Version: svn-trunk
Keywords: Cc:
CPU: Unspecified Platform: Unspecified

Description

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)

Change History (5)

comment:1 by neteler, 6 years ago

Milestone: 7.4.17.4.2

comment:2 by neteler, 6 years ago

Can you please try with trunk/Python3?

comment:3 by neteler, 6 years ago

Milestone: 7.4.27.4.3

Ticket retargeted after milestone closed

comment:4 by martinl, 5 years ago

Milestone: 7.4.37.4.4

Bump milestone to 7.4.4

comment:5 by neteler, 5 years ago

Milestone: 7.4.47.4.5

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.