Opened 6 years ago

Closed 5 years ago

#3422 closed defect (fixed)

UnicodeDecodeError in metadata (r.info) call in wxGUI

Reported by: mlennert Owned by: grass-dev@…
Priority: normal Milestone: 7.4.5
Component: wxGUI Version: svn-trunk
Keywords: r.info encoding Cc:
CPU: Unspecified Platform: Unspecified

Description

I have a map with the following r.info output on the command line:

> r.info map=liege_ucl@RW
 +----------------------------------------------------------------------------+
 | Map:      liege_ucl@RW                   Date: Mon Oct  9 12:12:23 2017    |
 | Mapset:   RW                             Login of Creator: mlennert        |
 | Location: Belgique31370                                                    |
 | DataBase: /data/GRASS/DATA7                                                |
 | Title:    liege_ucl.tif                                                    |
 | Timestamp: none                                                            |
 |----------------------------------------------------------------------------|
 |                                                                            |
 |   Type of Map:  raster               Number of Categories: 0               |
 |   Data Type:    CELL                                                       |
 |   Rows:         6452                                                       |
 |   Columns:      8656                                                       |
 |   Total Cells:  55848512                                                   |
 |        Projection: Lambert Conformal Conic                                 |
 |            N: 148834.59047566    S: 135976.34544505   Res: 1.99290841      |
 |            E: 237057.88316472    W: 219807.26800896   Res: 1.99290841      |
 |   Range of data:    min = 0  max = 55                                      |
 |                                                                            |
 |   Data Description:                                                        |
 |    generated by r.in.gdal                                                  |
 |                                                                            |
 |   Comments:                                                                |
 |    r.in.gdal input="ULB/ANAGEO/Région Wallonne/ClassifUCL/Liege.tif" o\   |
 |    utput="liege_ucl.tif" memory=300 offset=0 num_digits=0                  |
 |                                                                            |
 +----------------------------------------------------------------------------+

Note the accents in the r.in.gdal file path. When I try to display the same info using the automatically generated r.info GUI, I get the following in the Command output tab:

 +----------------------------------------------------------------------------+
 | Map:      liege_ucl@RW                   Date: Mon Oct  9 12:12:23 2017    |
 | Mapset:   RW                             Login of Creator: mlennert        |
 | Location: Belgique31370                                                    |
 | DataBase: /data/GRASS/DATA7                                                |
 | Title:    liege_ucl.tif                                                    |
 | Timestamp: none                                                            |
 |----------------------------------------------------------------------------|
 |                                                                            |
 |   Type of Map:  raster               Number of Categories: 0               |
 |   Data Type:    CELL                                                       |
 |   Rows:         6452                                                       |
 |   Columns:      8656                                                       |
 |   Total Cells:  55848512                                                   |
 |        Projection: Lambert Conformal Conic                                 |
 |            N: 148834.59047566    S: 135976.34544505   Res: 1.99290841      |
 |            E: 237057.88316472    W: 219807.26800896   Res: 1.99290841      |
 |   Range of data:    min = 0  max = 55                                      |
 |                                                                            |
 |   Data Description:                                                        |
 |    generated by r.in.gdal                                                  |
 |                                                                            |
 |   Comments:                                                                |
 |    utput="liege_ucl.tif" memory=300 offset=0 num_digits=0                  |
 |                                                                            |
 +----------------------------------------------------------------------------+

Note the first line of the r.in.gdal call missing. The following traceback is printed in the wxGUI Console output 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 35: ordinal
not in range(128)

I get the same result with right-click->Metadata in the Layer Manager.

Change History (6)

comment:1 by neteler, 6 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:2 by neteler, 6 years ago

Milestone: 7.4.17.4.2

comment:3 by neteler, 5 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

comment:6 by annakrat, 5 years ago

Resolution: fixed
Status: newclosed

Can't reproduce it, feel free to reopen.

Note: See TracTickets for help on using tickets.