Author saturn_mimas
Recipients saturn_mimas
Date 2008-07-22.14:32:11
SpamBayes Score 1.30948e-06
Marked as misclassified No
Message-id <1216737133.71.0.70086601319.issue3426@psf.upfronthosting.co.za>
In-reply-to
Content
If current working directory contains non-ascii characters, calling
os.path.abspath(u".") will result in an error. I expect it to call the
underlying os.getcwdu() in this case.

>>> import os
>>> os.path.abspath(u".")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/home/packages/python-2.5.1/x86-linux/lib/python2.5/posixpath.py", line
403, in abspath
    path = join(os.getcwd(), path)
  File
"/home/packages/python-2.5.1/x86-linux/lib/python2.5/posixpath.py", line
65, in join
    path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 29:
ordinal not in range(128)

It works if I do it manually, using os.getcwdu():

>>> os.path.join(os.getcwdu(), u".")
u'/disk1/chn_local/work/test/sk\xe4rg\xe5rds\xf6-latin1/.'
History
Date User Action Args
2008-07-22 14:32:14saturn_mimassetspambayes_score: 1.30948e-06 -> 1.30948e-06
recipients: + saturn_mimas
2008-07-22 14:32:13saturn_mimassetspambayes_score: 1.30948e-06 -> 1.30948e-06
messageid: <1216737133.71.0.70086601319.issue3426@psf.upfronthosting.co.za>
2008-07-22 14:32:13saturn_mimaslinkissue3426 messages
2008-07-22 14:32:11saturn_mimascreate