Message177370
>
> - Do you have a full traceback of the failing os.walk() in Python3.3?
>
Traceback (most recent call last):
File "test.py", line 9, in <module>
print(dirs)
File "C:\Python33\lib\encodings\cp437.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position
18-24: character maps to <undefined>
> - What's the result of os.listdir(u'.') ?
>
>python3 -c "import os; print(os.listdir(u'.'))"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python33\lib\encodings\cp437.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position
41-47: character maps to <undefined>
>python2 -c "import os; print(os.listdir(u'.'))"
[u'English name', u'test.py', u'test2.py',
u'\u0420\u0443\u0441\u0441\u043a\u043e\u0435 \u0438\u043c\u044f']
>python2 -c "import os; print(os.listdir('.'))"
['English name', 'test.py', 'test2.py', '??????? ???'] |
|
Date |
User |
Action |
Args |
2012-12-12 11:04:15 | techtonik | set | recipients:
+ techtonik, amaury.forgeotdarc, jkloth, r.david.murray, serhiy.storchaka |
2012-12-12 11:04:15 | techtonik | link | issue16656 messages |
2012-12-12 11:04:15 | techtonik | create | |
|