honglei jiang added the comment:
Python:canopy-1.3.0.1715.win-x86_64\
OS:Win8.1 64
>>>directory
'F:\\Flask\\EmberJS\\\xd6\xd0\xce\xc4\\Prj\\static'
>>>os.path.isdir(directory)
True
>>>filename
u'todomvc/architecture-examples/angularjs/index.html'
>>>os.path.join(directory,filename)
Traceback (most recent call last):
File
"c:\Users\honglei\AppData\Local\Enthought\Canopy\User\Lib\site-packages\flask\helpers.py",
line 1, in <module>
# -*- coding: utf-8 -*-
File
"C:\Users\honglei\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.3.0.1715.win-x86_64\Lib\ntpath.py",
line 108, in join
path += "\\" + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd6 in position 17:
ordinal not in range(128)
>>>f=os.path.join(directory.decode(sys.getfilesystemencoding()),filename)
>>>os.path.isfile(f)
True
----------
nosy: +jhonglei
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20140>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com