[GRASS-dev] [GRASS GIS] #3405: encoding issue when launching modules

GRASS GIS trac at osgeo.org
Thu Aug 24 07:46:02 PDT 2017


#3405: encoding issue when launching modules
--------------------------+---------------------------------------
  Reporter:  mlennert     |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  normal       |  Milestone:  7.4.0
 Component:  wxGUI        |    Version:  svn-trunk
Resolution:               |   Keywords:  g.search.modules encoding
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+---------------------------------------

Comment (by mlennert):

 Bingo ! I found the problem. At the top of lib/python/script/utils.py,
 there is this:

 {{{
 try:
     from builtins import unicode
 except ImportError:
     # python3
     unicode = str
 }}}

 However, in order to be able to import builtins I have to install the
 package python-future which was not the case on my home computer. Does
 this mean we assume this to be a dependence ?

 This said, if I just comment out this part of the code, I do not get the
 errors either, as apparently the decode function works as is with the
 builtin unicode type in python 2.

 Anna, could you enlighten me why this import from future is necessary ?
 And if it is, we will have to make this an official dependence...

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



More information about the grass-dev mailing list