Message257355
With python 3.4, Tarfile doesn't properly support adding a files with bytes path. Only unicode is supported. It's failing with exception similar to:
tar.add(os.path.join(dirpath, filename), filename)
File "/usr/lib/python3.4/tarfile.py", line 1907, in add
tarinfo = self.gettarinfo(name, arcname)
File "/usr/lib/python3.4/tarfile.py", line 1767, in gettarinfo
arcname = arcname.replace(os.sep, "/")
TypeError: expected bytes, bytearray or buffer compatible object
It uses os.sep, and u"/". Instead, it should use something like posixpath.py:_get_sep(path). |
|
Date |
User |
Action |
Args |
2016-01-02 19:53:25 | Patrik Dufresne | set | recipients:
+ Patrik Dufresne, vstinner, ezio.melotti |
2016-01-02 19:53:25 | Patrik Dufresne | set | messageid: <1451764405.28.0.333419880033.issue25997@psf.upfronthosting.co.za> |
2016-01-02 19:53:25 | Patrik Dufresne | link | issue25997 messages |
2016-01-02 19:53:24 | Patrik Dufresne | create | |
|