Opened 9 years ago

Closed 9 years ago

#2995 closed defect (fixed)

wxGUI start fails with charmap codec can't decode byte from g.version

Reported by: wenzeslaus Owned by: grass-dev@…
Priority: blocker Milestone: 7.0.4
Component: wxGUI Version: svn-releasebranch70
Keywords: g.version, version, packaging, wxGUI, compilation, locales, encoding Cc:
CPU: x86-32 Platform: MSWindows 8

Description

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

Change History (8)

comment:1 by martinl, 9 years ago

Right, gis.h is wrongly checkouted with Czech locales. I fixed that. Strangely on the same computer I am getting with g.version

libgis_date="2015-12-24 16:07:44 +0100 (Thu, 24 Dec 2015) "

I will create new package for testing.

comment:4 by wenzeslaus, 9 years ago

Resolution: fixed
Status: newclosed

Thanks. Both 32 and 64bit builds of RC1 are working now. I'm closing this as fixed, although there is still the question about how to handle the encoding properly but there is probably no simple way on MS Win since the text was written in Windows-1250 encoding but the reading was done with Windows-1252 encoding.

Last edited 9 years ago by wenzeslaus (previous) (diff)

comment:6 by hellik, 9 years ago

From another ticket

Are you sure you have the latest version? See #2995.
Oh I see, but it's the installer version linked on the download website which I get in my browser.
From here https://grass.osgeo.org/download/software/ms-windows/
I get this link https://grass.osgeo.org/grass70/binary/mswindows/native/x86_64/WinGRASS-7.0.4RC1-1-Setup-x86_64.exe}}}

comment:7 by wenzeslaus, 9 years ago

Resolution: fixed
Status: closedreopened

The announcement was updated with RC1-2 build but not the download page (see #3003). I think the download page should still have 7.0.3 at this point, i.e. it should not have release candidates (except for some extreme cases).

comment:8 by wenzeslaus, 9 years ago

Resolution: fixed
Status: reopenedclosed

Fixed (see #3003).

Note: See TracTickets for help on using tickets.