#2995: wxGUI start fails with charmap codec can't decode byte from g.version
-------------------------------------------------+-------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: defect | Status: new
Priority: blocker | Milestone: 7.0.4
Component: wxGUI | Version: svn-
Keywords: g.version, version, packaging, | releasebranch70
wxGUI, compilation, locales, encoding | CPU: x86-32
Platform: MSWindows 8 |
-------------------------------------------------+-------------------------
The main GUI (g.gui) in 7.0.4RC1 32bit fails to start because of non-ascii
characters in `g.version -rge`, namely in `libgis_date` entry which is
`"2015-12-24 16:07:44 +0100 (Ä?t, 24 12 2015) "` (I assume "Út", i.e. date
with locales instead of some ASCII). The tested computer has some US
locales.
Perhaps wxGUI should deal with that by some different handling (I don't
know what `charmap` is and how computes encoding influences that) or by
ignoring all errors and not showing the version (but maybe the version is
needed also elsewhere).
7.1 (trunk) works.
{{{
Traceback (most recent call last):
File "C:\Program Files (x86)\GRASS GIS 7.0.4RC1\gui\wxpython\wxgui.py",
line 1
48, in <module>
sys.exit(main())
File "C:\Program Files (x86)\GRASS GIS 7.0.4RC1\gui\wxpython\wxgui.py",
line 1
35, in main
app = GMApp(workspaceFile)
File "C:\Program Files (x86)\GRASS GIS 7.0.4RC1\gui\wxpython\wxgui.py",
line 5
0, in __init__
wx.App.__init__(self, False)
File "C:\Program Files (x86)\GRASS GIS 7.0.4RC1\Python27\lib\site-
packages\wx-
2.8-msw-unicode\wx\_core.py", line 7981, in __init__
self._BootstrapApp()
File "C:\Program Files (x86)\GRASS GIS 7.0.4RC1\Python27\lib\site-
packages\wx-
2.8-msw-unicode\wx\_core.py", line 7555, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "C:\Program Files (x86)\GRASS GIS 7.0.4RC1\gui\wxpython\wxgui.py",
line 8
4, in OnInit
workspace=self.workspaceFile)
File "C:\Program Files (x86)\GRASS GIS
7.0.4RC1\gui\wxpython\lmgr\frame.py", l
ine 93, in __init__
grassVersion = grass.version()['version']
File "C:\Program Files (x86)\GRASS GIS
7.0.4RC1\etc\python\grass\script\core.p
y", line 1502, in version
data = parse_command('g.version', flags='rge', errors='ignore')
File "C:\Program Files (x86)\GRASS GIS
7.0.4RC1\etc\python\grass\script\core.p
y", line 488, in parse_command
return parse(res, **parse_args)
File "C:\Program Files (x86)\GRASS GIS
7.0.4RC1\etc\python\grass\script\utils.
py", line 218, in parse_key_val
v = decode(kv[1].strip())
File "C:\Program Files (x86)\GRASS GIS
7.0.4RC1\etc\python\grass\script\utils.
py", line 160, in decode
return string.decode(enc)
File "C:\Program Files (x86)\GRASS GIS
7.0.4RC1\Python27\lib\encodings\cp1252.
py", line 15, in decode
return codecs.charmap_decode(input,errors,decoding_table)
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 29:
character maps to <undefined>
}}}
{{{
> g.version -rge
version=7.0.4RC1
date=2016
revision=68279
build_date=2016-04-19
build_platform=i386-w64-mingw32
libgis_revision=67364
libgis_date="2015-12-24 16:07:44 +0100 (Ä?t, 24 12 2015) "
proj4=4.9.2
gdal=2.0.2
geos=3.5.0
sqlite=3.7.17
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2995>
GRASS GIS <https://grass.osgeo.org>