[GRASS-dev] [GRASS GIS] #3423: UnicodeDecodeError in r.category in wxGUI when category labels contain special characters
GRASS GIS
trac at osgeo.org
Mon Oct 9 07:42:31 PDT 2017
#3423: UnicodeDecodeError in r.category in wxGUI when category labels contain
special characters
---------------------------------+-------------------------
Reporter: mlennert | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.4.0
Component: wxGUI | Version: svn-trunk
Keywords: r.category encoding | CPU: Unspecified
Platform: Unspecified |
---------------------------------+-------------------------
I have a map with the following categories:
{{{
> r.category liege_ucl
0
10 eau
15 sol nu
20 bâti
21 route
30 terre labourée
35 herbage non naturel
40 zone ouverte (semi)naturelle 1
45 zone ouverte (semi)naturelle 2
48 zone ouverte (semi)naturelle 3
50 résineux
55 feuillus
}}}
In the GUI, r.category gives:
{{{
r.category map=liege_ucl at RW
0
10 eau
15 sol nu
21 route
35 herbage non naturel
40 zone ouverte (semi)naturelle 1
45 zone ouverte (semi)naturelle 2
48 zone ouverte (semi)naturelle 3
55 feuillus
}}}
i.e. all categories with special characters in the labels are just
ignored.
The traceback in the Console window:
{{{
Traceback (most recent call last):
File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/gui_core/goutput.py", line 472, in
OnCmdOutput
self.cmdOutput.AddStyledMessage(message, type)
File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/gui_core/goutput.py", line 771, in
AddStyledMessage
self.AddTextWrapped(message, wrap=None)
File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/gui_core/goutput.py", line 722, in
AddTextWrapped
self.AddText(txt)
File "/usr/lib/python2.7/dist-
packages/wx-3.0-gtk2/wx/stc.py", line 2041, in AddText
return _stc.StyledTextCtrl_AddText(*args, **kwargs)
UnicodeDecodeError
:
'ascii' codec can't decode byte 0xc3 in position 4: ordinal
not in range(128)
Traceback (most recent call last):
File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/gui_core/goutput.py", line 472, in
OnCmdOutput
self.cmdOutput.AddStyledMessage(message, type)
File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/gui_core/goutput.py", line 771, in
AddStyledMessage
self.AddTextWrapped(message, wrap=None)
File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/gui_core/goutput.py", line 722, in
AddTextWrapped
self.AddText(txt)
File "/usr/lib/python2.7/dist-
packages/wx-3.0-gtk2/wx/stc.py", line 2041, in AddText
return _stc.StyledTextCtrl_AddText(*args, **kwargs)
UnicodeDecodeError
:
'ascii' codec can't decode byte 0xc3 in position 15: ordinal
not in range(128)
Traceback (most recent call last):
File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/gui_core/goutput.py", line 472, in
OnCmdOutput
self.cmdOutput.AddStyledMessage(message, type)
File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/gui_core/goutput.py", line 771, in
AddStyledMessage
self.AddTextWrapped(message, wrap=None)
File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/gui_core/goutput.py", line 722, in
AddTextWrapped
self.AddText(txt)
File "/usr/lib/python2.7/dist-
packages/wx-3.0-gtk2/wx/stc.py", line 2041, in AddText
return _stc.StyledTextCtrl_AddText(*args, **kwargs)
UnicodeDecodeError
:
'ascii' codec can't decode byte 0xc3 in position 4: ordinal
not in range(128)
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3423>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list