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 sejvlond
Recipients sejvlond
Date 2015-12-15.08:33:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450168391.42.0.368048088305.issue25867@psf.upfronthosting.co.za>
In-reply-to
Content
os.stat() raises exception UnicodeEncodeError when path is unicode and no locale is set in envinronment (this occures when running app with daemon tools -> LC_ALL=)

How to simulate:
$ env -i python
>>> import os
>>> os.stat(u"\xf0")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf0' in position 0: ordinal not in range(128)

Is this a valid behaviour? Then maybe some notification in documentation would be nice (I am using os.path.isfile and now UnicodeEncodeError raised...)

Thanks
Ondra
History
Date User Action Args
2015-12-15 08:33:11sejvlondsetrecipients: + sejvlond
2015-12-15 08:33:11sejvlondsetmessageid: <1450168391.42.0.368048088305.issue25867@psf.upfronthosting.co.za>
2015-12-15 08:33:11sejvlondlinkissue25867 messages
2015-12-15 08:33:10sejvlondcreate