You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my environment I get following error: Unexpected error occured during the unzipping/decryption of the file | decompress() takes exactly 1 argument (2 given)
Related issue
To Reproduce
The fail is hard using following:
with py7zr.SevenZipFile(bio, mode='r', password=get_archive_pw(dataprovider, archive_name)) as archive:
files = archive.readall()
Expected behavior
Environment (please complete the following information):
OS: Ubuntu 18.04.6 LTS
Python 3.9
py7zr version: All versions > 0.18.4
Test data(please attach in the report):
Additional context
The problem is introduced in version 0.18.5 with change of following in compresser.py:
Version 0.18.4:
def _decompress(self, data, max_length: int):
for i, decompressor in enumerate(self.chain):
if self._unpacked[i] < self._unpacksizes[i]:
if isinstance(decompressor, LZMA1Decompressor) or isinstance(decompressor, PpmdDecompressor):
data = decompressor.decompress(data, max_length) # always give max_length for lzma1
else:
data = decompressor.decompress(data)
self._unpacked[i] += len(data)
elif len(data) == 0:
data = b""
else:
raise EOFError
return data
Version 0.18.5 and newer:
def _decompress(self, data, max_length: int):
for i, decompressor in enumerate(self.chain):
if self._unpacked[i] < self._unpacksizes[i]:
data = decompressor.decompress(data, max_length)
self._unpacked[i] += len(data)
elif len(data) == 0:
data = b""
else:
raise EOFError
return data
I have tested version 0.22.0 introducing the " data = decompressor.decompress(data)" and this works fine. But I would prefer an offical fix, rather than this personal hack.
The text was updated successfully, but these errors were encountered:
Describe the bug
In my environment I get following error: Unexpected error occured during the unzipping/decryption of the file | decompress() takes exactly 1 argument (2 given)
Related issue
To Reproduce
The fail is hard using following:
with py7zr.SevenZipFile(bio, mode='r', password=get_archive_pw(dataprovider, archive_name)) as archive:
files = archive.readall()
Expected behavior
Environment (please complete the following information):
Test data(please attach in the report):
Additional context
The problem is introduced in version 0.18.5 with change of following in compresser.py:
Version 0.18.4:
Version 0.18.5 and newer:
I have tested version 0.22.0 introducing the " data = decompressor.decompress(data)" and this works fine. But I would prefer an offical fix, rather than this personal hack.
The text was updated successfully, but these errors were encountered: