[GRASS-dev] [GRASS GIS] #2827: wxGUI: encoding error in error messages

#2827: wxGUI: encoding error in error messages
-------------------------+---------------------------------
Reporter: mlennert | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: svn-releasebranch70
Keywords: encoding | CPU: Unspecified
Platform: Unspecified |
-------------------------+---------------------------------
In several modules, whenever I try to launch the module with missing
parameters, I get an error message as such in the command console of the
wxGUI, but no error message in the module output tab:

{{{
Traceback (most recent call last):
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
-unknown-linux-gnu/gui/wxpython/gui_core/forms.py", line
696, in OnRun

cmd = self.createCmd()
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
-unknown-linux-gnu/gui/wxpython/gui_core/forms.py", line
791, in createCmd

ignoreRequired = ignoreRequired)
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64
-unknown-linux-gnu/gui/wxpython/gui_core/forms.py", line
2344, in createCmd

message = unicode(err),
UnicodeDecodeError
:
'ascii' codec can't decode byte 0xc3 in position 8: ordinal
not in range(128)
}}}

Reproduced with trunk, grass70_release and grass 7.0.2 with locale
fr_BE.utf8.

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

#2827: wxGUI: encoding error in error messages
--------------------------+---------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: svn-releasebranch70
Resolution: | Keywords: encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by neteler):

I just tried on Fedora 23:

{{{
export LANG=fr_BE.utf8
export LANGUAGE=fr_BE.utf8
export LC_MESSAGES=fr_BE.utf8

grass70
}}}

.. looks initally ok here: g.gui starts, also d.rast from menu.

Launching v.buffer from menu generates the error (but the module GUI comes
up behind the error msg window).

Could there be any "evil" char in locale/po/grassmods_fr.po?

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

#2827: wxGUI: encoding error in error messages
--------------------------+---------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: svn-releasebranch70
Resolution: | Keywords: encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by marisn):

I assume there is no "evil" char in po file. This is just another "ups! I
forgot to deal with incoming string encoding" type error in python code.
Although I can not reproduce the issue, it can depend on 1) particular
string; 2) locale; 3) return of python's
getlocadedefaultencodingwhatinmostofcasesistotallywronganyway.

Moritz - please, provide exact command exposing the issue. Also take a
look if it isn't a duplicate of #2800 #2727 #2617 #2390 #2120 #1856 #1672
#1488 or #1293

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

#2827: wxGUI: encoding error in error messages
--------------------------+---------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: svn-releasebranch70
Resolution: | Keywords: encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by annakrat):

Fixed in r67187, tested on linux only so far.

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

#2827: wxGUI: encoding error in error messages
--------------------------+---------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: svn-releasebranch70
Resolution: | Keywords: encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by neteler):

Replying to [comment:3 annakrat]:
> Fixed in r67187, tested on linux only so far.

Now, when *starting* v.buffer it is ok but clicking on "Run" ("Exécuter"),
even without anything set, still triggers it (Linux with Python: 2.7.10,
wxPython: 3.0.2.0 ).

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

#2827: wxGUI: encoding error in error messages
--------------------------+---------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: svn-releasebranch70
Resolution: | Keywords: encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by annakrat):

Replying to [comment:4 neteler]:
> Replying to [comment:3 annakrat]:
> > Fixed in r67187, tested on linux only so far.
>
> Now, when *starting* v.buffer it is ok but clicking on "Run"
("Exécuter"), even without anything set, still triggers it (Linux with
Python: 2.7.10, wxPython: 3.0.2.0 ).

Fixed in r67205. But we need to test it on Windows as well.

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

#2827: wxGUI: encoding error in error messages
--------------------------+---------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: svn-releasebranch70
Resolution: | Keywords: encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by mlennert):

Replying to [comment:5 annakrat]:
> Replying to [comment:4 neteler]:
> > Replying to [comment:3 annakrat]:
> > > Fixed in r67187, tested on linux only so far.
> >
> > Now, when *starting* v.buffer it is ok but clicking on "Run"
("Exécuter"), even without anything set, still triggers it (Linux with
Python: 2.7.10, wxPython: 3.0.2.0 ).
>
> Fixed in r67205. But we need to test it on Windows as well.

Yes, thanks, works for me on GNU/Linux. I don't have the opportunity to
test on Windows at the moment.

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

#2827: wxGUI: encoding error in error messages
--------------------------+---------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: svn-releasebranch70
Resolution: | Keywords: encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by mlennert):

Replying to [comment:3 annakrat]:
> Fixed in r67187, tested on linux only so far.

For me this fixes #2826, not this bug.

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

#2827: wxGUI: encoding error in error messages
--------------------------+---------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: svn-releasebranch70
Resolution: | Keywords: encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by annakrat):

OK, my mistake, r67262 should fix this correctly and it's tested on
Windows. Moritz, could you go through the tickets related to this
(suggested above), test and update which ones are to be closed?

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

#2827: wxGUI: encoding error in error messages
--------------------------+---------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: svn-releasebranch70
Resolution: | Keywords: encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by martinl):

Any plan for backport to relbr70? Regarding to milestone 7.0.3...

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

#2827: wxGUI: encoding error in error messages
--------------------------+---------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: svn-releasebranch70
Resolution: | Keywords: encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by mlennert):

Replying to [comment:9 martinl]:
> Any plan for backport to relbr70? Regarding to milestone 7.0.3...

This should definitely be backported. It is very annoying and is still
happening in release70.

See also the related [https://bugs.debian.org/cgi-
bin/bugreport.cgi?bug=806257 Debian bug].

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

#2827: wxGUI: encoding error in error messages
--------------------------+---------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: svn-releasebranch70
Resolution: fixed | Keywords: encoding
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------
Changes (by annakrat):

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

Comment:

Backported in r67323.

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