[GRASS-dev] [GRASS GIS] #2532: TypeError: environment can only contain string when launching script on Windows
GRASS GIS
trac at osgeo.org
Mon Jan 5 14:39:50 PST 2015
#2532: TypeError: environment can only contain string when launching script on
Windows
-------------------------+--------------------------------------------------
Reporter: annakrat | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: encoding | Platform: MSWindows 8
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by annakrat):
Replying to [comment:1 glynn]:
> Replying to [ticket:2532 annakrat]:
>
> wxGUI's core.gcmd module has EncodeString() and DecodeString() methods
which use whatever wxGUI considers to be the "system" encoding. Those are
used by gcmd.Popen for converting the arguments to strings and by
gcmd.RunCommand() for converting the process' output to unicode.
OK, I used EncodeString, but then with non-ascii characters I get (ascii
only path works fine now):
{{{
Traceback (most recent call last):
File "C:\Users\akratoc\Programs\GRASS GIS
7.0.0svn\gui\wxpython\lmgr\frame.py", line 842, in
OnRunScript
filename = EncodeString(filename)
File "C:\Users\akratoc\Programs\GRASS GIS
7.0.0svn\gui\wxpython\core\gcmd.py", line 101, in
EncodeString
return string.encode(_enc)
File "C:\Users\akratoc\Programs\GRASS GIS
7.0.0svn\Python27\lib\encodings\cp1252.py", line 12, in
encode
return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError
:
'charmap' codec can't encode character u'\u0165' in position
40: character maps to <undefined>
}}}
I have seen this error in several other tickets, is there something we can
do about it?
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2532#comment:2>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list