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 GeorgeNotaras
Recipients GeorgeNotaras
Date 2007-11-30.23:00:05
SpamBayes Score 0.0410497
Marked as misclassified No
Message-id <>
Assume the following situation:
- a healthy and uncompressed tar file: a.tar
- the metadata of the 1st and second files within the archive start at
positions 0 and 756 (realistic example values)

I partially damage 200 bytes of metadata (byte range 0-500) of the first
archived file:

f = open("a.tar", "rb+")

Now, I seek to the start of the 2nd archived file's metadata:

And I try to open the tar archive using passing the
previous fileobject to it.

import tarfile
f_tar =
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "", line 1143, in open
    raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully

Wouldn't the expected behaviour be to successfully open the tar archive
at offset 756?

It seems that seeks to position 0 of the
fileobject f, fails to read the 1st archived file's metadata and throws
an exception.
Date User Action Args
2007-11-30 23:00:06GeorgeNotarassetspambayes_score: 0.0410497 -> 0.0410497
recipients: + GeorgeNotaras
2007-11-30 23:00:06GeorgeNotarassetspambayes_score: 0.0410497 -> 0.0410497
messageid: <>
2007-11-30 23:00:06GeorgeNotaraslinkissue1531 messages
2007-11-30 23:00:05GeorgeNotarascreate