[GRASS-dev] Re: [GRASS GIS] #868: wxGUI: UnicodeEncodeError in Help
-> GIS GUI help
GRASS GIS
trac at osgeo.org
Wed Jan 13 02:03:21 EST 2010
#868: wxGUI: UnicodeEncodeError in Help -> GIS GUI help
----------------------+-----------------------------------------------------
Reporter: neteler | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: closed
Priority: normal | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: fixed | Keywords:
Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Changes (by neteler):
* status: new => closed
* resolution: => fixed
Comment:
Replying to [comment:1 glynn]:
> Replying to [ticket:868 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 wxGUI
> }}}
>
> 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.
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
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/868#comment:2>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list