Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read failed (archive_read_data_block): (-30) while reading large archive by blocks #25

Open
user2589 opened this issue May 30, 2017 · 1 comment

Comments

@user2589
Copy link

user2589 commented May 30, 2017

Download a large archive. Archive used in this example is a .7z archive from StackExchange dataset. It is 10.8Gb compressed and contains only one 55Gb file.

Read the file by blocks:

>>> import libarchive.public as libarchive
>>> with libarchive.file_reader('../dataset/stackoverflow.com-Posts.7z') as archive:
...     for entry in archive:
...         if str(entry) != 'Posts.xml':
...             continue
...         for block in entry.get_blocks():
...             pass
... 
Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
  File "/usr/local/lib/python2.7/dist-packages/libarchive/adapters/archive_read.py", line 219, in get_blocks
    for block in _read_by_block(self.reader_res):
  File "/usr/local/lib/python2.7/dist-packages/libarchive/adapters/archive_read.py", line 210, in _read_by_block
    (r,))
ValueError: Read failed (archive_read_data_block): (-30)
@dsoprea dsoprea closed this as completed Sep 25, 2017
@dsoprea dsoprea reopened this Sep 25, 2017
@user2589
Copy link
Author

It looks to be a libarchive issue, so I resubmitted this bug in their repository libarchive/libarchive#913 .
I guess this one can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants