Fails to extract attached 7z file in LZMA2 settings
zackees opened this issue · comments
Describe the bug
A clear and concise description of what the bug is.
Related issue
(if exist)
To Reproduce
Steps to reproduce the behavior:
(example)
- Prepare test data attached as 'file' in current directory.
- Run following code with python3.
py7zr x archive.7z
Expected behavior
the archive to unzip
Actual Behavior
Traceback (most recent call last):
File "c:\users\niteris\appdata\local\programs\python\python38\lib\runpy.py", line 192, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\niteris\appdata\local\programs\python\python38\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\niteris\dev\static_ffmpeg\venv\Scripts\py7zr.exe\__main__.py", line 7, in <module>
File "C:\Users\niteris\dev\static_ffmpeg\venv\lib\site-packages\py7zr\__main__.py", line 25, in main
return cli.Cli().run()
File "C:\Users\niteris\dev\static_ffmpeg\venv\lib\site-packages\py7zr\cli.py", line 99, in run
return args.func(args)
File "C:\Users\niteris\dev\static_ffmpeg\venv\lib\site-packages\py7zr\cli.py", line 358, in run_extract
a.extractall(callback=cb)
File "C:\Users\niteris\dev\static_ffmpeg\venv\lib\site-packages\py7zr\py7zr.py", line 959, in extractall
self._extract(path=path, return_dict=False, callback=callback)
File "C:\Users\niteris\dev\static_ffmpeg\venv\lib\site-packages\py7zr\py7zr.py", line 621, in _extract
self.worker.extract(
File "C:\Users\niteris\dev\static_ffmpeg\venv\lib\site-packages\py7zr\py7zr.py", line 1238, in extract
raise exc_type(exc_val).with_traceback(exc_tb)
TypeError: __init__() missing 1 required positional argument: 'message'
Environment (please complete the following information):
- OS: Windows 10
- Python python 3.8.0
- py7zr version: py7zr 0.17.3
Test data(please attach in the report):
This archive
Additional context
Add any other context about the problem here.
* To make archive:
* (Win32) select darwin/linux/win32 and right click 7z -> "add to archive"
* Assumes you've installed 7z archiver for windows
* format: 7z
* Compression Level: Ultra
* Compression Method: LZMA2
* Dictionary Size: 1024
* Word Size 64
* Solid Block Size 512MB
v0.17.4 fixes the unexpected error TypeError: __init__() missing 1 required positional argument: 'message'
when unsupported compression method.
Looks duplicated with #408
Compression Level: Ultra
use BCJ2 that is not supported by python lzma module.
see https://sevenzip.osdn.jp/chm/cmdline/switches/method.htm