Anthony Sottile <asott...@umich.edu> added the comment:
I took a stab at improving the error message (see the linked PR) $ ./python -c 'import tarfile; tarfile.open("Lib/test/testtar.tar.xz")' Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/asottile/workspace/cpython/Lib/tarfile.py", line 1620, in open raise ReadError(f"file could not be opened successfully:\n{error_msgs}") tarfile.ReadError: file could not be opened successfully: - method gz: ReadError('not a gzip file') - method bz2: CompressionError('bz2 module is not available') - method xz: CompressionError('lzma module is not available') - method tar: ReadError('truncated header') ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue8978> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com