Comments (13)
The example file seems to be built with -m0=LZMA2:d23
option, but it cannot be reproduced with another files.
Type = 7z
Physical Size = 1161371
Headers Size = 5574
Method = LZMA2:23
Solid = +
Blocks = 1
from pylzma.
Could you please provide a small sample file containing only a "Hello world!" textfile?
from pylzma.
I cannot reproduce it with small files. It is a smallest file in which I observed same error.
The file has 418 files, 14 folders. compressed 1155797
When run it with PyCharm debugger, I got
on p7zlib.py: 884
- fidx: 1
- len(folders): 1
- len(subinfo.unpackstreams): 1
- subinfo.unpackstreams[0]: 417
- info['filename'] =
5.9.7/gcc_64/lib/libQt5XmlPatterns.prl
as same as a last file shown when running7zr l
command that file size is 1088 - obidx: 417
- packsizes[0]: 1155797
- streams.packinfo.numstreams: 1
- streams.packinfo.packpos: 1155797
- streams.packinfo.packsizes[0]: 5505
- unpackinfo.folders[0].solid: False
- len(unpacksizes[]) : 417
It seems a problem may happen in last file in an archive.
from pylzma.
Could you please provide a small sample file containing only a "Hello world!" textfile?
test with "Hello World!" data passed.
def test_github_59(self):
fp = self._open_file(os.path.join(ROOT, 'data', 'github_59_small.7z'), 'rb')
archive = Archive7z(fp)
self._test_decode_all(archive)
from pylzma.
Generating random 418 files become no luck, too.
import os
import random
os.mkdir('github_59')
for i in range(13):
os.mkdir('github_59/dir%d' % i)
for i in range(418):
with open('github_59/dir1/%d'% i, 'wb') as f:
for j in range(random.randrange(1024)):
f.write(random.randrange(65535).to_bytes(2, 'big'))
os.system('7z a -m0=LZMA2:d23 github_59_s.7z github_59/')
Path = github_59_s.7z
Type = 7z
Physical Size = 426246
Headers Size = 2991
Method = LZMA2:19
Solid = +
Blocks = 1
It is difficult to make a small file to reproduce the issue. Any suggenstion?
from pylzma.
I cannot reproduce it with small files. It is a smallest file in which I observed same error.
Feel free to send me the file by mail, you can find the address in my profile.
from pylzma.
from pylzma.
@fancycode I just ran into the same issue at my end. I looked around a little bit and saw that commit 9122f07 had failed build, while subsequent commits passed all the builds. As I am not familiar with the CI process, I am not sure if this means that the failed build was addressed by subsequent ones and therefore, the fix was still shipped eventually. However, a quick inspection of the commit and a comparison with the pypi release version 0.5 seems to indicate that changes from this commit were not eventually shipped.
from pylzma.
@fancycode Okay, nevermind. I just found out that released version 0.5.0 has the codebase from commit 56a23b7 from way back in Sept 2018. Are there any plans for newer releases?
from pylzma.
I have the same issue. pylzma 0.5.0 installed with pip3 on Ubuntu Focal:
echo 'from py7zlib import Archive7z; fp = open("recoll.7z", "rb");a = Archive7z(fp)' | python3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/dist-packages/py7zlib.py", line 884, in __init__
folder = folders[fidx]
IndexError: list index out of range
The archive has source files for the open source project recoll in it. You can download it from: https://www.lesbonscomptes.com/recoll/files/recoll.7z
from pylzma.
@medoc92 you can see alternative 7z library that can extract the file I reported here.
from pylzma.
@miurahr the problem is that I need to read the data to memory, and I get the impression that the py7zr memory only works for extracting to files ?
from pylzma.
@medoc92 you should put a question for another project, on that project.
from pylzma.
Related Issues (20)
- Bugs Report : Incorrect stream properties
- Data error during extraction HOT 20
- Feature request: read 7zip file line by line HOT 1
- py7zlib fails when decompressing lzma2 bcj2 7z file HOT 2
- Feature: py7zlib: archive file mode and format API HOT 2
- Can't decompress the lzma1900.7z file using py7zlib.Archive7z HOT 1
- py7zlib: _read64Bit() returns None when reading bytes start with 0xff HOT 1
- Incorrect stream properties (TypeError) while trying to decompress HOT 1
- How read a 7z file with volumes?
- Do not automatically skip directory entries
- Feature: Add support for streaming ArchiveFiles HOT 2
- Hope to achieve the function of encryption
- Recent important updates not on pypi HOT 2
- Requested pylzma==0.5.0 but installing version is 0.5.0.post0 HOT 1
- index error
- python2 syntax in test_usage.py
- "pip instal pylzma" not working
- Building FreeBSD port archivers/py-lzma fails with error
- compliation fails on OpenBSD 7.3 / Python 3.10
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 pylzma.