#2634 closed defect (fixed)
'utf8' codec can't decode byte 0xf6 in position 8: invalid start byte
Reported by: | hellik | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | 7.0.1 |
Component: | Default | Version: | svn-trunk |
Keywords: | utf, wxgui | Cc: | |
CPU: | x86-32 | Platform: | MSWindows 7 |
Description
taken from the ML
http://lists.osgeo.org/pipermail/grass-dev/2015-March/074529.html
GRASS Version: 7.1.svn GRASS SVN revision: 64858 Build date: 2015-03-15 Build platform: i686-pc-mingw32 GDAL: 1.11.2 PROJ.4: 4.8.0 GEOS: 3.4.2 SQLite: 3.7.17 Python: 2.7.4 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
a ms windows error message window: 'utf8' codec can't decode byte 0xf6 in position 8: invalid start byte <http://osgeo-org.1560.x6.nabble.com/file/n5193488/utf_codec_error_15032015_232313.png> pops up when invoking e.g. d.vect r.slope.aspect ... and following error message: Traceback (most recent call last): File "C:\OSGEO4~2\apps\grass\grass-7.1.svn\gui\wxpython\gu i_core\forms.py", line 2054, in OnUpdateDialog self.parent.updateValuesHook() File "C:\OSGEO4~2\apps\grass\grass-7.1.svn\gui\wxpython\gu i_core\forms.py", line 628, in updateValuesHook self.SetStatusText(' '.join(self.notebookpanel.createCmd(ignoreErrors = True))) TypeError
http://lists.osgeo.org/pipermail/grass-dev/2015-March/074540.html
interesting: _no_ problems with commands like e.g.: g.region g.mapset g.access g.gisenv g.extension problems with commands like e.g.: r.slope.aspect d.vect r.watershed r.neigbhours v.parallel ...
also tested on another machine:
System Info GRASS Version: 7.1.svn GRASS SVN revision: 64889 Build date: 2015-03-21 Build platform: i686-pc-mingw32 GDAL: 1.11.2 PROJ.4: 4.8.0 GEOS: 3.4.2 SQLite: 3.7.17 Python: 2.7.4 wxPython: 2.8.12.1 Platform: Windows-Vista-6.0.6002-SP2 (OSGeo4W)
the same error
Change History (24)
comment:1 by , 10 years ago
Priority: | major → critical |
---|
follow-up: 3 comment:2 by , 10 years ago
comment:3 by , 10 years ago
Replying to hellik:
makes winGRASS trunk quite unusable ... not there in winGRASS7.0.x ....
tested on different german winVista/win7/win8-boxes ...
comment:4 by , 10 years ago
Milestone: | 7.1.0 → 7.0.1 |
---|
follow-up: 6 comment:5 by , 10 years ago
it's also now in the 7.0.1RC1, tested in the NC sample dataset
System Info GRASS Version: 7.0.1RC1 GRASS SVN Revision: 65472 Erstellungsdatum: 2015-06-15 Build Platform: i686-pc-mingw32 GDAL/OGR: 1.11.2 PROJ.4: 4.8.0 GEOS: 3.4.2 SQLite: 3.7.17 Python: 2.7.4 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
choosing d.rast from the wxgui
a MS error box pops up with
'utf8' codec can't decode byte 0xf6 in position 8: invalid start byte
followed by this message in the wxgui
Traceback (most recent call last): File "C:\OSGEO4~2\apps\grass\grass-7.0.1RC1\gui\wxpython\g ui_core\forms.py", line 2023, in OnUpdateDialog self.parent.updateValuesHook() File "C:\OSGEO4~2\apps\grass\grass-7.0.1RC1\gui\wxpython\g ui_core\forms.py", line 628, in updateValuesHook self.SetStatusText(' '.join(self.notebookpanel.createCmd(ignoreErrors = True))) TypeError
as mentioned in the original ticket above, e.g. g.region works without any problem
any ideas?
follow-up: 7 comment:6 by , 10 years ago
Replying to hellik:
it's also now in the 7.0.1RC1, tested in the NC sample dataset
System Info GRASS Version: 7.0.1RC1 GRASS SVN Revision: 65472 Erstellungsdatum: 2015-06-15 Build Platform: i686-pc-mingw32 GDAL/OGR: 1.11.2 PROJ.4: 4.8.0 GEOS: 3.4.2 SQLite: 3.7.17 Python: 2.7.4 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)choosing d.rast from the wxgui
a MS error box pops up with
'utf8' codec can't decode byte 0xf6 in position 8: invalid start bytefollowed by this message in the wxgui
Traceback (most recent call last): File "C:\OSGEO4~2\apps\grass\grass-7.0.1RC1\gui\wxpython\g ui_core\forms.py", line 2023, in OnUpdateDialog self.parent.updateValuesHook() File "C:\OSGEO4~2\apps\grass\grass-7.0.1RC1\gui\wxpython\g ui_core\forms.py", line 628, in updateValuesHook self.SetStatusText(' '.join(self.notebookpanel.createCmd(ignoreErrors = True))) TypeErroras mentioned in the original ticket above, e.g. g.region works without any problem
any ideas?
language is set following:
GUI preferences -> language -> system
follow-ups: 8 9 comment:7 by , 10 years ago
Replying to hellik:
language is set following:
GUI preferences -> language -> system
ok, I switched the language to englisch:
GUI preferences -> language -> en
this error disappears.
maybe some error in the translation?
comment:8 by , 10 years ago
follow-up: 10 comment:9 by , 10 years ago
Replying to hellik:
Replying to hellik:
language is set following:
GUI preferences -> language -> system
ok, I switched the language to englisch:
GUI preferences -> language -> enthis error disappears.
maybe some error in the translation?
Haven't tested, but it seems like the opposite. A string is translated but some python code expects it to be an ascii string. There have been similar issues already reported (see #2617 for longer discussion). Traceback indicates use of str method on unicode object in 'gui_core\forms.py' file. wxgui is full of such issues and in many places it is unknown if adding just a u' ' would not introduce problems elsewhere :( Backporting r64834 could help in some cases but an overhaul of any string processing in wxgui is required with strict rules (that need to be created).
follow-ups: 11 24 comment:10 by , 10 years ago
follow-up: 12 comment:11 by , 9 years ago
Replying to martinl:
Replying to marisn: adding just a u' ' would not introduce problems elsewhere :( Backporting r64834 could help in some cases but an overhaul of any string processing in wxgui is required with strict rules (that need to be created).
it's already done in r65462
Helmut, could you please test current 7.0.1svn if it still works (1)?
follow-ups: 13 14 comment:12 by , 9 years ago
Replying to martinl:
Replying to martinl:
Replying to marisn: adding just a u' ' would not introduce problems elsewhere :( Backporting r64834 could help in some cases but an overhaul of any string processing in wxgui is required with strict rules (that need to be created).
it's already done in r65462
Helmut, could you please test current 7.0.1svn if it still works (1)?
tested with
GRASS Version: 7.0.1RC1 GRASS SVN Revision: 65472 Erstellungsdatum: 2015-06-15 Build Platform: i686-pc-mingw32 GDAL/OGR: 1.11.2 PROJ.4: 4.8.0 GEOS: 3.4.2 SQLite: 3.7.17 Python: 2.7.4 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
manually and locally reverted r65462 => error disappears
problems with commands like e.g.: r.slope.aspect d.vect r.watershed r.neigbhours v.parallel ...
all these modules are working without the reported error!
comment:13 by , 9 years ago
Replying to hellik:
Replying to martinl:
Replying to martinl:
Replying to marisn: adding just a u' ' would not introduce problems elsewhere :( Backporting r64834 could help in some cases but an overhaul of any string processing in wxgui is required with strict rules (that need to be created).
it's already done in r65462
Helmut, could you please test current 7.0.1svn if it still works (1)?
tested with
GRASS Version: 7.0.1RC1 GRASS SVN Revision: 65472 Erstellungsdatum: 2015-06-15 Build Platform: i686-pc-mingw32 GDAL/OGR: 1.11.2 PROJ.4: 4.8.0 GEOS: 3.4.2 SQLite: 3.7.17 Python: 2.7.4 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
tested in german locale!
follow-ups: 15 16 comment:14 by , 9 years ago
comment:15 by , 9 years ago
comment:16 by , 9 years ago
follow-up: 18 comment:17 by , 9 years ago
Have anyone tried to investigate where the utf8 error comes from? Perhaps r65462 is not the problem. I agree with reverting it for the release, but it should stay in trunk for more investigation.
comment:18 by , 9 years ago
Replying to annakrat:
Have anyone tried to investigate where the utf8 error comes from? Perhaps r65462 is not the problem. I agree with reverting it for the release, but it should stay in trunk for more investigation.
g.gisenv set=DEBUG=3
C:\>r.slope.aspect D1/3: G_set_program_name(): r.slope.aspect D2/3: G_file_name(): path = C:\grassdata/gbifwgs84/chechdb D3/3: G_recreate_command() D3/3: win_spawn: args = C:\windows\system32\cmd.exe /c "C:\OSGEO4~2\bin\python.e xe C:\OSGEO4~2\apps\grass\grass-7.1.svn/gui/wxpython/gui_core/forms.py r.slope.a spect" D1/3: G_set_program_name(): g.gisenv D3/3: G_option_to_separator(): key = separator -> sep = ' ' D1/3: grass.script.core.start_command(): g.gisenv -n D1/3: G_set_program_name(): g.gisenv D3/3: G_option_to_separator(): key = separator -> sep = ' ' Traceback (most recent call last): File "C:\OSGEO4~2\apps\grass\grass-7.1.svn/gui/wxpython/gui_core/forms.py", li ne 2545, in <module> Debug.msg(1, "forms.py opening form for: %s" % task.get_cmd(ignoreErrors=Tru e)) File "C:\OSGEO4~2\apps\grass\grass-7.1.svn\etc\python\grass\script\task.py", l ine 235, in get_cmd cmd += [('%s=%s' % (p['name'], _('<required>'))).decode('utf-8')] File "C:\OSGEO4~2\apps\Python27\lib\encodings\utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xf6 in position 14: invalid start byte C:\>
follow-up: 20 comment:19 by , 9 years ago
Please try this (with r64834 in place):
-
task.py
232 232 if p.get('default', '') != '': 233 233 cmd += ['%s=%s' % (p['name'], p['default'])] 234 234 elif ignoreErrors and not suppress_required and not ignoreRequired: 235 cmd += [ ('%s=%s' % (p['name'], _('<required>'))).decode('utf-8')]235 cmd += ['%s=%s' % (p['name'], _('<required>'))] 236 236 elif p.get('value', '') == '' and p.get('default', '') != '' and not ignoreDefault: 237 237 cmd += ['%s=%s' % (p['name'], p['default'])] 238 238 elif p.get('value', '') != '' and \
This was introduced in r61704 and seems to be not needed with r64834.
follow-up: 21 comment:20 by , 9 years ago
Replying to annakrat:
Please try this (with r64834 in place):
task.py
232 232 if p.get('default', '') != '': 233 233 cmd += ['%s=%s' % (p['name'], p['default'])] 234 234 elif ignoreErrors and not suppress_required and not ignoreRequired: 235 cmd += [ ('%s=%s' % (p['name'], _('<required>'))).decode('utf-8')]235 cmd += ['%s=%s' % (p['name'], _('<required>'))] 236 236 elif p.get('value', '') == '' and p.get('default', '') != '' and not ignoreDefault: 237 237 cmd += ['%s=%s' % (p['name'], p['default'])] 238 238 elif p.get('value', '') != '' and \ This was introduced in r61704 and seems to be not needed with r64834.
tested locally with with r64834 in place: no error anymore.
so let's test with the next nightly build and go on to the next RC!
thanks!
follow-up: 22 comment:21 by , 9 years ago
comment:22 by , 9 years ago
Replying to annakrat:
Replying to hellik:
tested locally with with r64834 in place: no error anymore.
so let's test with the next nightly build and go on to the next RC!
thanks!
Committed to trunk in r65529 and backported to releasebranch in r65530.
tested with
GRASS Version: 7.1.svn GRASS SVN revision: 65532 Build date: 2015-07-02 Build platform: i686-pc-mingw32 GDAL: 1.11.2 PROJ.4: 4.8.0 GEOS: 3.4.2 SQLite: 3.7.17 Python: 2.7.4 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
as it seems to work now, I'm closing ticket.
comment:23 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to hellik:
still valid for
makes winGRASS trunk quite unusable ... not there in winGRASS7.0.x ....