miurahr / py7zr

7zip in python3 with ZStandard, PPMd, LZMA2, LZMA1, Delta, BCJ, BZip2, and Deflate compressions, and AES encryption.

Home Page:https://pypi.org/project/py7zr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not extract a volum archive

H2Sxxa opened this issue · comments

Describe the bug

When I try to extract a volume file.it got "py7zr.exceptions.Bad7zFile: invalid header data"

Related issue

To Reproduce

  1. prepare a volum 7z archive
  2. use this code to extract it
import py7zr
print(py7zr.__version__)
with py7zr.SevenZipFile("file.7z.001") as f:
    f.extractall()

Expected behavior

Traceback (most recent call last):
  File "....test.py", line 3, in <module>
    with py7zr.SevenZipFile("file.7z.001") as f:
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\py7zr\py7zr.py", line 399, in __init__
    raise e
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\py7zr\py7zr.py", line 385, in __init__
    self._real_get_contents(password)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\py7zr\py7zr.py", line 425, in _real_get_contents
    raise Bad7zFile("invalid header data")
py7zr.exceptions.Bad7zFile: invalid header data

Environment (please complete the following information):

  • OS: Windows 7
  • Python 3.8.10
  • py7zr version: 0.19.0

Test data(please attach in the report):

Download the file and code

https://cdn.xhacgn.com/api/v3/slave/source/0/dXBsb2Fkcy8xMC8yMDIyLzA3LzI4L3BhUHN4SmpuX3Rlc3QuN3o/test.7z?sign=umGjQi-eYfTaCsbvssOliA0__XNecd-wmb_gGRG2V0Y%3D%3A0

Additional context

Thx,it works successfully now