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 pbienst
Recipients pbienst
Date 2010-01-13.14:08:21
SpamBayes Score 2.998592e-05
Marked as misclassified No
Message-id <1263391703.94.0.0768397922167.issue7693@psf.upfronthosting.co.za>
In-reply-to
Content
import tarfile

fname = unichr(40960) + u"a.ogg"

f = file(fname, "w")
f.write("A")
f.close()
        
tar_pipe = tarfile.open("test.tar", mode="w|",
    format=tarfile.PAX_FORMAT)
tar_pipe.add(fname)
tar_pipe.close()

tar_pipe = tarfile.open("test.tar")
tar_pipe.extractall(u".") # Just "." as string works fine.

This gives:

Traceback (most recent call last):
  File "a.py", line 15, in <module>
    tar_pipe.extractall(u".") # Just "." as string works fine.
  File "/usr/lib/python2.6/tarfile.py", line 2031, in extractall
    self.extract(tarinfo, path)
  File "/usr/lib/python2.6/tarfile.py", line 2068, in extract
    self._extract_member(tarinfo, os.path.join(path, tarinfo.name))
  File "/usr/lib/python2.6/posixpath.py", line 70, in join
    path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xea in position 1: ordinal not in range(128)
History
Date User Action Args
2010-01-13 14:08:24pbienstsetrecipients: + pbienst
2010-01-13 14:08:23pbienstsetmessageid: <1263391703.94.0.0768397922167.issue7693@psf.upfronthosting.co.za>
2010-01-13 14:08:22pbienstlinkissue7693 messages
2010-01-13 14:08:21pbienstcreate