Opened 7 years ago

Closed 7 years ago

#3205 closed defect (fixed)

d.legend title fails with UnicodeEncodeError

Reported by: marisn Owned by: grass-dev@…
Priority: normal Milestone: 7.2.1
Component: wxGUI Version: svn-trunk
Keywords: d.legend Cc:
CPU: Unspecified Platform: Linux

Description

d.legend raster=4323slope title="Krituma leņķis"

Traceback (most recent call last):
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
gnu/gui/wxpython/gui_core/forms.py", line 799, in OnApply

self)
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
gnu/gui/wxpython/mapdisp/frame.py", line 1332, in GetOptData

overlay.Show()
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
gnu/gui/wxpython/mapwin/decorations.py", line 134, in Show

self._add()
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
gnu/gui/wxpython/mapwin/decorations.py", line 160, in _add

hidden=True)
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
gnu/gui/wxpython/core/render.py", line 1480, in AddOverlay

active=active, hidden=hidden, opacity=opacity)
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
gnu/gui/wxpython/core/render.py", line 354, in __init__

Layer.__init__(self, ltype='overlay', *args, **kwargs)
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
gnu/gui/wxpython/core/render.py", line 117, in __init__

(self.type, self.GetCmd(string=True), self.name,
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
gnu/gui/wxpython/core/render.py", line 199, in GetCmd

return utils.GetCmdString(self.cmd)
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
gnu/gui/wxpython/core/utils.py", line 508, in GetCmdString

return ' '.join(gtask.cmdtuple_to_list(cmd))
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/script/task.py", line 639, in
cmdtuple_to_list

v = '"{}"'.format(v)
UnicodeEncodeError
:
'ascii' codec can't encode characters in position 10-11:
ordinal not in range(128)

GRASS versija: 7.3.svn GRASS SVN revision: r69783M Build date: 2016-11-07 Build platform: x86_64-pc-linux-gnu GDAL: 2.0.2 PROJ.4: 4.9.2 GEOS: 3.5.0 SQLite: 3.14.2 Python: 2.7.12 wxPython: 3.0.2.0 Platform: Linux-4.8.4-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P9500_@_2.53GHz-with-gentoo-2.3

Change History (3)

comment:1 by annakrat, 7 years ago

In 69803:

libpython: use different formatting notation to avoid problems with unicode, see #3205

comment:2 by annakrat, 7 years ago

In 69804:

libpython: use different formatting notation to avoid problems with unicode, see #3205 (merge from trunk, r69803)

comment:3 by annakrat, 7 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.