[GRASS-dev] [GRASS GIS] #3673: wxGUI: UnicodeEncodeError when querying vector map

#3673: wxGUI: UnicodeEncodeError when querying vector map
----------------------------------+-------------------------
Reporter: mlennert | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: svn-trunk
Keywords: wxGUI query encoding | CPU: Unspecified
Platform: Unspecified |
----------------------------------+-------------------------
Querying a vector map, I get the following error:

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

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

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

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

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

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

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

self.dialogs['query'] = QueryDialog(parent=self,
data=result)
   File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/gui_core/query.py", line 52, in
__init__

self._model = QueryTreeBuilder(self.data,
column=self._colNames[1])
   File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/gui_core/query.py", line 238, in
QueryTreeBuilder

addNode(parent=model.root, data=part, model=model)
   File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/gui_core/query.py", line 227, in
addNode

addNode(parent=node, data=v, model=model)
   File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/gui_core/query.py", line 227, in
addNode

addNode(parent=node, data=v, model=model)
   File
"/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-
linux-gnu/gui/wxpython/gui_core/query.py", line 230, in
addNode

v = str(v)
UnicodeEncodeError
:
'ascii' codec can't encode character u'\xe8' in position 25:
ordinal not in range(128)
}}}

{{{
g.version -g
version=7.7.svn
date=2018
revision=r73472M
build_date=2018-10-01
build_platform=x86_64-pc-linux-gnu
build_off_t_size=8
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3673&gt;
GRASS GIS <https://grass.osgeo.org>

#3673: wxGUI: UnicodeEncodeError when querying vector map
--------------------------+----------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: wxGUI query encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------

Comment (by annakrat):

In [changeset:"73493" 73493]:
{{{
#!CommitTicketReference repository="" revision="73493"
wxGUI: fix querying for Python 2/3, see #3673
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3673#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3673: wxGUI: UnicodeEncodeError when querying vector map
--------------------------+----------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: wxGUI query encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------

Comment (by annakrat):

Please test, no backporting needed.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3673#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3673: wxGUI: UnicodeEncodeError when querying vector map
--------------------------+----------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: svn-trunk
Resolution: fixed | Keywords: wxGUI query encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------
Changes (by mlennert):

* status: new => closed
* resolution: => fixed

Comment:

Replying to [comment:1 annakrat]:
> In [changeset:"73493" 73493]:
> {{{
> #!CommitTicketReference repository="" revision="73493"
> wxGUI: fix querying for Python 2/3, see #3673
> }}}

Seems to be fixed. Thanks, Anna !

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3673#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>