[GRASS-dev] Trunk breakage with Python 2

Maris Nartiss maris.gis at gmail.com
Fri Apr 26 12:29:20 PDT 2019


Hello everyone,
is Python 2 still supported or trunk is already 3 only? If it is
supported, then a serious fixing is required. If it is Python 3 only,
then it should run on Python 3 and not 2.

After recent changes, most of GUI functionality is more-less broken
with console filling with various UnicodeDecodeError errors. Startup
screen works (sort of), autogenerated GUIs – only partial
functionality, layer manager & map window – fail to start.

python --version
Python 2.7.15

LANG=lv_LV.UTF-8
LC_CTYPE=lv_LV.utf8
LC_NUMERIC=lv_LV.utf8
LC_TIME=lv_LV.utf8
LC_COLLATE=lv_LV.utf8
LC_MONETARY=lv_LV.utf8
LC_MESSAGES=lv_LV.utf8
LC_PAPER=lv_LV.utf8
LC_NAME=lv_LV.utf8
LC_ADDRESS=lv_LV.utf8
LC_TELEPHONE=lv_LV.utf8
LC_MEASUREMENT=lv_LV.utf8
LC_IDENTIFICATION=lv_LV.utf8

[IP-] [  ] app-eselect/eselect-wxwidgets-20180529:0
[IP-] [  ] dev-python/wxpython-3.0.2.0:3.0
[IP-] [  ] x11-libs/wxGTK-3.0.4-r1:3.0
[IP-] [  ] x11-libs/wxGTK-3.0.4-r301:3.0-gtk3

bin.x86_64-pc-linux-gnu/grass77
Startē GRASS GIS...
/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py:16629:
UserWarning: wxPython/wxWidgets release number mismatch
  warnings.warn("wxPython/wxWidgets release number mismatch")
Traceback (most recent call last):
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/widgets.py",
line 545, in DoGetBestSize
    self._updateLabel()
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/widgets.py",
line 565, in _updateLabel
    GenStaticText.SetLabel(self, newLabel)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/lib/stattext.py",
line 58, in SetLabel
    wx.PyControl.SetLabel(self, label)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py",
line 9207, in SetLabel
    return _core_.Window_SetLabel(*args, **kwargs)
  File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc4 in position
27: invalid continuation byte
Traceback (most recent call last):
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/widgets.py",
line 545, in DoGetBestSize
    self._updateLabel()
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/widgets.py",
line 565, in _updateLabel
    GenStaticText.SetLabel(self, newLabel)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/lib/stattext.py",
line 58, in SetLabel
    wx.PyControl.SetLabel(self, label)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py",
line 9207, in SetLabel
    return _core_.Window_SetLabel(*args, **kwargs)
  File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc5 in position 7:
invalid continuation byte
Traceback (most recent call last):
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/widgets.py",
line 556, in OnSize
    self._updateLabel()
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/widgets.py",
line 565, in _updateLabel
    GenStaticText.SetLabel(self, newLabel)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/lib/stattext.py",
line 58, in SetLabel
    wx.PyControl.SetLabel(self, label)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py",
line 9207, in SetLabel
    return _core_.Window_SetLabel(*args, **kwargs)
  File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc5 in position
145: unexpected end of data
Traceback (most recent call last):
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/widgets.py",
line 556, in OnSize
    self._updateLabel()
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/widgets.py",
line 565, in _updateLabel
    GenStaticText.SetLabel(self, newLabel)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/lib/stattext.py",
line 58, in SetLabel
    wx.PyControl.SetLabel(self, label)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py",
line 9207, in SetLabel
    return _core_.Window_SetLabel(*args, **kwargs)
  File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc5 in position
145: unexpected end of data
Traceback (most recent call last):
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/widgets.py",
line 556, in OnSize
    self._updateLabel()
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/widgets.py",
line 565, in _updateLabel
    GenStaticText.SetLabel(self, newLabel)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/lib/stattext.py",
line 58, in SetLabel
    wx.PyControl.SetLabel(self, label)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py",
line 9207, in SetLabel
    return _core_.Window_SetLabel(*args, **kwargs)
  File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc5 in position
145: unexpected end of data
Traceback (most recent call last):
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/widgets.py",
line 556, in OnSize
    self._updateLabel()
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/widgets.py",
line 565, in _updateLabel
    GenStaticText.SetLabel(self, newLabel)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/lib/stattext.py",
line 58, in SetLabel
    wx.PyControl.SetLabel(self, label)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py",
line 9207, in SetLabel
    return _core_.Window_SetLabel(*args, **kwargs)
  File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc5 in position
145: unexpected end of data
Traceback (most recent call last):
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/widgets.py",
line 556, in OnSize
    self._updateLabel()
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/widgets.py",
line 565, in _updateLabel
    GenStaticText.SetLabel(self, newLabel)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/lib/stattext.py",
line 58, in SetLabel
    wx.PyControl.SetLabel(self, label)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py",
line 9207, in SetLabel
    return _core_.Window_SetLabel(*args, **kwargs)
  File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc5 in position
145: unexpected end of data
Traceback (most recent call last):
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/widgets.py",
line 556, in OnSize
    self._updateLabel()
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/widgets.py",
line 565, in _updateLabel
    GenStaticText.SetLabel(self, newLabel)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/lib/stattext.py",
line 58, in SetLabel
    wx.PyControl.SetLabel(self, label)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py",
line 9207, in SetLabel
    return _core_.Window_SetLabel(*args, **kwargs)
  File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc5 in position
145: unexpected end of data
Startē <wxpython> grafisko vidi fona režīmā. Lūdzu uzgaidiet...
GRASS 7.7.svn (Latvija_LKS):~/soft/grass_trunk >
/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py:16629:
UserWarning: wxPython/wxWidgets release number mismatch
  warnings.warn("wxPython/wxWidgets release number mismatch")
Traceback (most recent call last):
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/wxgui.py",
line 172, in <module>
    sys.exit(main())
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/wxgui.py",
line 159, in main
    app = GMApp(workspaceFile)
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/wxgui.py",
line 53, in __init__
    wx.App.__init__(self, False)
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py",
line 8628, in __init__
    self._BootstrapApp()
  File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py",
line 8196, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/wxgui.py",
line 106, in OnInit
    workspace=self.workspaceFile)
  File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/gui/wxpython/lmgr/frame.py",
line 90, in __init__
    self.baseTitle = _("GRASS GIS %s Layer Manager") % grassVersion
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position
5: ordinal not in range(128)


More information about the grass-dev mailing list