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 catlee
Recipients Jeffrey.Kintscher, adunand, andrew.garner, catlee, lars.gustaebel, mdk, serhiy.storchaka
Date 2020-05-17.13:38:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
It's caused by the combination of the symlink existing, and having the tarfile opened in r| mode.

If I run the attached test file in a fresh directory, I get the following exception:

raceback (most recent call last):
  File "/home/catlee/.pyenv/versions/3.8.2/lib/python3.8/", line 2227, in makelink
    os.symlink(tarinfo.linkname, targetpath)
FileExistsError: [Errno 17] File exists: 'message.txt' -> './symlink.txt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "../", line 12, in <module>
  File "/home/catlee/.pyenv/versions/3.8.2/lib/python3.8/", line 2024, in extractall
    self.extract(tarinfo, path, set_attrs=not tarinfo.isdir(),
  File "/home/catlee/.pyenv/versions/3.8.2/lib/python3.8/", line 2065, in extract
    self._extract_member(tarinfo, os.path.join(path,,
  File "/home/catlee/.pyenv/versions/3.8.2/lib/python3.8/", line 2145, in _extract_member
    self.makelink(tarinfo, targetpath)
  File "/home/catlee/.pyenv/versions/3.8.2/lib/python3.8/", line 2237, in makelink
  File "/home/catlee/.pyenv/versions/3.8.2/lib/python3.8/", line 2137, in _extract_member
    self.makefile(tarinfo, targetpath)
  File "/home/catlee/.pyenv/versions/3.8.2/lib/python3.8/", line 2176, in makefile
  File "/home/catlee/.pyenv/versions/3.8.2/lib/python3.8/", line 513, in seek
    raise StreamError("seeking backwards is not allowed")
tarfile.StreamError: seeking backwards is not allowed
Date User Action Args
2020-05-17 13:38:02catleesetrecipients: + catlee, lars.gustaebel, adunand, serhiy.storchaka, andrew.garner, mdk, Jeffrey.Kintscher
2020-05-17 13:38:02catleesetmessageid: <>
2020-05-17 13:38:02catleelinkissue12800 messages
2020-05-17 13:38:02catleecreate