tarfile-Progress-Reporter icon indicating copy to clipboard operation
tarfile-Progress-Reporter copied to clipboard

Not support Python3, cuz the syntax error on "print"

Open Eroyi opened this issue 6 years ago • 2 comments

such as print '…………' should be like print ('……')

Eroyi avatar Oct 24 '19 03:10 Eroyi

and

Traceback (most recent call last):
  File "tar.py", line 11, in <module>
    tar = tarfile.open(filename)
  File "/usr/lib64/python3.6/tarfile.py", line 1571, in open
    return func(name, "r", fileobj, **kwargs)
  File "/usr/lib64/python3.6/tarfile.py", line 1643, in gzopen
    t = cls.taropen(name, mode, fileobj, **kwargs)
  File "/usr/lib64/python3.6/tarfile.py", line 1619, in taropen
    return cls(name, mode, fileobj, **kwargs)
  File "/root/tarfile_progress/tarfile_progress.py", line 44, in __init__
    tarinfo, dereference, ignore_zeros, pax_headers, debug, errorlevel)
  File "/usr/lib64/python3.6/tarfile.py", line 1482, in __init__
    self.firstmember = self.next()
  File "/usr/lib64/python3.6/tarfile.py", line 2297, in next
    tarinfo = self.tarinfo.fromtarfile(self)
  File "/usr/lib64/python3.6/tarfile.py", line 1093, in fromtarfile
    obj = cls.frombuf(buf, tarfile.encoding, tarfile.errors)
  File "/usr/lib64/python3.6/tarfile.py", line 1040, in frombuf
    obj.name = nts(buf[0:100], encoding, errors)
  File "/usr/lib64/python3.6/tarfile.py", line 172, in nts
    return s.decode(encoding, errors)
TypeError: decode() argument 2 must be str, not None

Eroyi avatar Oct 24 '19 07:10 Eroyi

+1

turian avatar Dec 31 '22 17:12 turian