Message234662
Python 2.7.9 (default, Jan 25 2015, 13:41:30)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, sys, tempfile
>>> d = u'\u20ac'.encode(sys.getfilesystemencoding()) # non-ascii
>>> if not os.path.isdir(d): os.makedirs(d)
...
>>> os.environ['TEMP'] = d
>>> tempfile.mkdtemp(prefix=u'')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../python2.7/tempfile.py", line 331, in mkdtemp
file = _os.path.join(dir, prefix + name + suffix)
File ".../python2.7/posixpath.py", line 80, in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 13: ordinal not in range(128)
Related: https://bugs.python.org/issue1681974 |
|
Date |
User |
Action |
Args |
2015-01-25 11:02:16 | akira | set | recipients:
+ akira, vstinner, ezio.melotti |
2015-01-25 11:02:16 | akira | set | messageid: <1422183736.06.0.60780511869.issue23315@psf.upfronthosting.co.za> |
2015-01-25 11:02:15 | akira | link | issue23315 messages |
2015-01-25 11:02:15 | akira | create | |
|