[GRASS-dev] [GRASS GIS] #2617: wxgui Raster query redirect to console UnicodeDecodeError

GRASS GIS trac at osgeo.org
Tue Dec 22 03:30:11 PST 2015


#2617: wxgui Raster query redirect to console UnicodeDecodeError
--------------------------+----------------------------------------------
  Reporter:  marisn       |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  normal       |  Milestone:  7.0.3
 Component:  wxGUI        |    Version:  svn-trunk
Resolution:               |   Keywords:  query, encoding, python, gettext
       CPU:  Unspecified  |   Platform:  MSWindows Vista
--------------------------+----------------------------------------------

Comment (by mlennert):

 I'm still getting this error both in trunk and release70. My locale:


 {{{
 > locale
 LANG=fr_BE
 LANGUAGE=fr_BE
 LC_CTYPE=fr_BE.UTF-8
 LC_NUMERIC=C
 LC_TIME=fr_BE.UTF-8
 LC_COLLATE=fr_BE.UTF-8
 LC_MONETARY=fr_BE.UTF-8
 LC_MESSAGES=fr_BE.UTF-8
 LC_PAPER=fr_BE.UTF-8
 LC_NAME=fr_BE.UTF-8
 LC_ADDRESS=fr_BE.UTF-8
 LC_TELEPHONE=fr_BE.UTF-8
 LC_MEASUREMENT=fr_BE.UTF-8
 LC_IDENTIFICATION=fr_BE.UTF-8
 LC_ALL=
 }}}

 I only get an error with a raster map with labels (e.g. landclass96),
 presumably because 'label' is translated to 'étiquette' in French.

 Here's the entire backtrace:

 {{{
 Traceback (most recent call last):
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
 -unknown-linux-gnu/gui/wxpython/mapwin/buffered.py", line
 1234, in MouseActions

 self.OnLeftUp(event)
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
 -unknown-linux-gnu/gui/wxpython/mapwin/buffered.py", line
 1411, in OnLeftUp

 self.mapQueried.emit(x=self.mouse['end'][0],
 y=self.mouse['end'][1])
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
 -unknown-linux-gnu/etc/python/grass/pydispatch/signal.py",
 line 229, in emit

 dispatcher.send(signal=self, *args, **kwargs)
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
 -unknown-linux-
 gnu/etc/python/grass/pydispatch/dispatcher.py", line 349, in
 send

 **named
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
 -unknown-linux-
 gnu/etc/python/grass/pydispatch/robustapply.py", line 60, in
 robustApply

 return receiver(*arguments, **named)
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
 -unknown-linux-gnu/gui/wxpython/mapdisp/frame.py", line 868,
 in Query

 self.QueryMap(east, north, qdist, rast, vect)
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
 -unknown-linux-gnu/gui/wxpython/mapdisp/frame.py", line 920,
 in QueryMap

 self.dialogs['query'].SetData(result)
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
 -unknown-linux-gnu/gui/wxpython/gui_core/query.py", line 87,
 in SetData

 self.redirectOutput.emit(output=self._textToRedirect())
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
 -unknown-linux-gnu/gui/wxpython/gui_core/query.py", line
 148, in _textToRedirect

 text = printResults(self._model, self._colNames[1])
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
 -unknown-linux-gnu/gui/wxpython/gui_core/query.py", line
 215, in printResults

 return '\n'.join(textList)
 UnicodeDecodeError
 :
 'ascii' codec can't decode byte 0xc3 in position 2: ordinal
 not in range(128)
 }}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2617#comment:13>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list