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 parthm
Recipients parthm
Date 2010-04-14.09:50:00
SpamBayes Score 8.1970153e-10
Marked as misclassified No
Message-id <1271238603.95.0.608393654552.issue8396@psf.upfronthosting.co.za>
In-reply-to
Content
If any directory higher up in the hierarchy contains unicode chars, tarfile.open fails with UnicodeDecodeError. Attached script reproduces this error.

[tmp]% python tarfilefail.py 
Traceback (most recent call last):
  File "tarfilefail.py", line 9, in <module>
    tarfile.open(file_name, 'w')
  File "/usr/lib/python2.6/tarfile.py", line 1682, in open
    return cls.taropen(name, mode, fileobj, **kwargs)
  File "/usr/lib/python2.6/tarfile.py", line 1692, in taropen
    return cls(name, mode, fileobj, **kwargs)
  File "/usr/lib/python2.6/tarfile.py", line 1527, in __init__
    self.name = os.path.abspath(name) if name else None
  File "/usr/lib/python2.6/posixpath.py", line 338, in abspath
    path = join(os.getcwd(), path)
  File "/usr/lib/python2.6/posixpath.py", line 70, in join
    path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 17: ordinal not in range(128)
[tmp]%
History
Date User Action Args
2010-04-14 09:50:04parthmsetrecipients: + parthm
2010-04-14 09:50:03parthmsetmessageid: <1271238603.95.0.608393654552.issue8396@psf.upfronthosting.co.za>
2010-04-14 09:50:02parthmlinkissue8396 messages
2010-04-14 09:50:00parthmcreate