This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jhonglei
Recipients Jarek.Śmiejczak, jhonglei, ncoghlan, vinay.sajip, vstinner
Date 2014-05-27.17:16:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401210983.92.0.507450642061.issue20140@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2014-05-27 17:16:24jhongleisetrecipients: + jhonglei, vinay.sajip, ncoghlan, vstinner, Jarek.Śmiejczak
2014-05-27 17:16:23jhongleisetmessageid: <1401210983.92.0.507450642061.issue20140@psf.upfronthosting.co.za>
2014-05-27 17:16:23jhongleilinkissue20140 messages
2014-05-27 17:16:23jhongleicreate