Comments (5)
py7zr intend to support bzip2 compression method for 7zip format.
From your log, py7zr happily decode header information and start decompression.
An error you report is happend in
Lines 327 to 333 in 1eae95a
This means output data of bzip2 decompressor returns a zero size. I'm not sure a condition when it happened, and I don't have data to reproduce it.
If you can prepare minimum and small test archive to reproduce it, please upload to this report.
from py7zr.
Hi,
Here is the sample file: 10000SalesRecords.zip
I have zipped the 7z archive so I can able to upload here.
How did I created the sample .7z file and tested it:
-
Downloaded and decompressed sample .csv file http://eforexcel.com/wp/wp-content/uploads/2017/07/10000-Sales-Records.zip
-
On Win10 using 7-Zip software I compressed the file using BZip2 compression method
-
Tested the decompression on Fedora 31 and py7zr v0.6a1 release
Used code for testing:
import py7zr
archive = py7zr.SevenZipFile('10000SalesRecords.7z', mode='r')
print(archive.getnames())
print(archive.test())
Results:
['10000SalesRecords.csv']
Traceback (most recent call last):
File "decompress.py", line 7, in
print(archive.test())
File "/home/amarkus/.pyenv/versions/3.7.3/lib/python3.7/site-packages/py7zr/py7zr.py", line 688, in test
return self._test_digests()
File "/home/amarkus/.pyenv/versions/3.7.3/lib/python3.7/site-packages/py7zr/py7zr.py", line 528, in _test_digests
if self._test_unpack_digest():
File "/home/amarkus/.pyenv/versions/3.7.3/lib/python3.7/site-packages/py7zr/py7zr.py", line 520, in _test_unpack_digest
self.worker.extract(self.fp) # TODO: print progress
File "/home/amarkus/.pyenv/versions/3.7.3/lib/python3.7/site-packages/py7zr/compression.py", line 277, in extract
self.src_start + positions[i + 1])
File "/home/amarkus/.pyenv/versions/3.7.3/lib/python3.7/site-packages/py7zr/compression.py", line 307, in extract_single
self.decompress(fp, f.folder, fileish, f.uncompressed[-1], f.compressed, src_end)
File "/home/amarkus/.pyenv/versions/3.7.3/lib/python3.7/site-packages/py7zr/compression.py", line 335, in decompress
raise DecompressionError
py7zr.exceptions.DecompressionError
from py7zr.
Thank you for sharing test data! I can reproduce a problem, and I'd like to add this data as test case.
from py7zr.
Sure, feel free to add it to the test cases
from py7zr.
The case is solved and released.
from py7zr.
Related Issues (20)
- Please consider removing 0.9.5 -> 0.11.2 packages from pypi.org (malware test cases) HOT 3
- IndexError / Worker initialization sets wrong last_file_index HOT 2
- Code cannot handle Error which are presented as "There are some data after the end of the payload data" in 7zip HOT 4
- Some test cases use deprecated functions
- Unable to create 7z/zip archive. HOT 3
- AttributeError when adding empty string with writestr() HOT 2
- Python "zipfile" compatibility HOT 2
- Is there an option to split to volumes? HOT 1
- Memory leaks when uncompressing multi-volume archives HOT 2
- File extraction fails when give filename str as a `targets` argument in v0.21.0 HOT 8
- read/readall dumps the decompressed files to memory, instead of streaming them HOT 2
- Extraction is not completing and dosen't give any error
- Add support for `mode="x"` in `SevenZipFile()` constructor
- py7zr fails to extract a specific encrypted archive
- bug
- Python 3.7 is not supported in version 0.21.0 HOT 1
- Extracting a corrupt 7z file and try to delete it will cause the PermissionError in windows
- Give version number to be 1.0.0 and change status to be production HOT 1
- `mode="a"` errors if the file doesn't already exist
- Add `getinfo()` method to get a single `FileInfo` by name HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py7zr.