Opened 15 years ago
Closed 15 years ago
#868 closed defect (fixed)
wxGUI: UnicodeEncodeError in Help -> GIS GUI help
Reported by: | neteler | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 6.4.0 |
Component: | wxGUI | Version: | svn-releasebranch64 |
Keywords: | Cc: | ||
CPU: | x86-64 | Platform: | Linux |
Description
Trying Help -> GIS GUI help, I got:
Traceback (most recent call last): File "/home/neteler/grass64/dist.x86_64-unknown-linux- gnu/etc/wxpython/wxgui.py", line 538, in OnAboutGRASS win = AboutWindow(self) File "/home/neteler/grass64/dist.x86_64-unknown-linux- gnu/etc/wxpython/wxgui.py", line 1669, in __init__ authortxt = wx.StaticText(authorwin, id=wx.ID_ANY, label=str(authors)) UnicodeEncodeError : 'ascii' codec can't encode character u'\u571f' in position 91: ordinal not in range(128) Traceback (most recent call last): File "/home/neteler/grass64/dist.x86_64-unknown-linux- gnu/etc/wxpython/wxgui.py", line 538, in OnAboutGRASS win = AboutWindow(self) File "/home/neteler/grass64/dist.x86_64-unknown-linux- gnu/etc/wxpython/wxgui.py", line 1669, in __init__ authortxt = wx.StaticText(authorwin, id=wx.ID_ANY, label=str(authors)) UnicodeEncodeError : 'ascii' codec can't encode character u'\u571f' in position 91: ordinal not in range(128) Traceback (most recent call last): File "/home/neteler/grass64/dist.x86_64-unknown-linux- gnu/etc/wxpython/wxgui.py", line 538, in OnAboutGRASS win = AboutWindow(self) File "/home/neteler/grass64/dist.x86_64-unknown-linux- gnu/etc/wxpython/wxgui.py", line 1669, in __init__ authortxt = wx.StaticText(authorwin, id=wx.ID_ANY, label=str(authors)) UnicodeEncodeError : 'ascii' codec can't encode character u'\u571f' in position 91: ordinal not in range(128) (Wed Jan 13 03:48:45 2010) g.manual wxGUI
Closing, opening the GUI solved the problem. Feel free to close if there is nothing to fix.
Markus
Change History (2)
follow-up: 2 comment:1 by , 15 years ago
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to glynn:
Replying to neteler: Trying Help -> GIS GUI help, I got:
authortxt = wx.StaticText(authorwin, id=wx.ID_ANY, label=str(authors)) UnicodeEncodeError: 'ascii' codec can't encode character u'\u571f' in position 91: ordinal not in range(128) (Wed Jan 13 03:48:45 2010) g.manual wxGUIThe error refers to the code which is run for Help -> About GRASS GIS (OnAboutGRASS()), while "g.manual wxGUI" is run for Help -> GRASS GIS GUI help.
Sorry for the confusion.
I'm guessing that the error relates to #860, but you only noticed it later (when the GUI switched to the command output tab for g.manual.
Did you try adding a Japanese name to AUTHORS?
After applying your fix to 6.4, I could read the file again in wxGUI and found
$Date: 2010-01-09 05:20:30 +0100 (土, 09 1月 2010) $
So the locale influences the SVN Date tag. Interesting.
If so, that's likely to fail due to str(authors) (which is bogus; you can (and should) pass Python unicode() objects to wxPython; there isn't any reason to convert to a str()).
Fixed in 7.0 with r40408. 6.4 is quite different (most of the help stuff has been moved from wxgui.py to gui_modules/help.py).
Fixed in r40409 (6.4) and r40410 (6.5).
Markus
Replying to neteler: Trying Help -> GIS GUI help, I got:
The error refers to the code which is run for Help -> About GRASS GIS (OnAboutGRASS()), while "g.manual wxGUI" is run for Help -> GRASS GIS GUI help.
I'm guessing that the error relates to #860, but you only noticed it later (when the GUI switched to the command output tab for g.manual.
Did you try adding a Japanese name to AUTHORS? If so, that's likely to fail due to str(authors) (which is bogus; you can (and should) pass Python unicode() objects to wxPython; there isn't any reason to convert to a str()).
Fixed in 7.0 with r40408. 6.4 is quite different (most of the help stuff has been moved from wxgui.py to gui_modules/help.py).