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

unexpected end of data #226

Open
zhihengGet opened this issue Aug 31, 2024 · 3 comments
Open

unexpected end of data #226

zhihengGet opened this issue Aug 31, 2024 · 3 comments
Milestone

Comments

@zhihengGet
Copy link

zhihengGet commented Aug 31, 2024

  1. followed instruction but i cannto download python-dev , no such packages to download
is only available from another source
      However the following packages replace it:
        python2-dev python2 python-dev-is-python3
      
      E: Package 'python-dev' has no installation candidate
  1. run hatch shell then gutenberg command

[gutenberg2zim::2024-08-31 11:17:18,004] INFO: Skipping already parsed file cache/epub/146/pg146.rdf for book id 146
[gutenberg2zim::2024-08-31 11:17:18,033] INFO: Skipping already parsed file cache/epub/147/pg147.rdf for book id 147
[gutenberg2zim::2024-08-31 11:17:18,075] INFO: Skipping already parsed file cache/epub/148/pg148.rdf for book id 148
[gutenberg2zim::2024-08-31 11:17:18,106] INFO: Skipping already parsed file cache/epub/149/pg149.rdf for book id 149
[gutenberg2zim::2024-08-31 11:17:18,134] INFO: Skipping already parsed file cache/epub/150/pg150.rdf for book id 150
Traceback (most recent call last):
File "/home/abc/.local/share/hatch/env/virtual/gutenberg2zim/HXfwz31n/gutenberg2zim/bin/gutenberg2zim", line 8, in
sys.exit(entrypoint.main())
^^^^^^^^^^^^^^^^^
File "/mnt/c/Users/nicej/Documents/git_proj/books/gutenberg/src/gutenberg2zim/entrypoint.py", line 191, in main
parse_and_fill(rdf_path=rdf_path, only_books=books)
File "/mnt/c/Users/nicej/Documents/git_proj/books/gutenberg/src/gutenberg2zim/rdf.py", line 40, in parse_and_fill
for rdf_member in rdf_tarfile:
File "/usr/lib/python3.11/tarfile.py", line 2475, in iter
tarinfo = self.next()
^^^^^^^^^^^
File "/usr/lib/python3.11/tarfile.py", line 2344, in next
raise ReadError("unexpected end of data")
tarfile.ReadError: unexpected end of data

@benoit74
Copy link
Collaborator

benoit74 commented Sep 3, 2024

  1. Of course, python-dev availability is varying from linux distro to linux distro ... and I'm not sure it is really required ; I've opened Clarify GNU/Linux requirements on README.md #227 to track the change required

  2. Looks like the tar file you got is corrupted ... is it a systematic failure ?

If you only want to create a ZIM, I advise to install docker and use the docker image (it is unfortunately undocumented yet, see #228 I've just opened). Basically docker run -it --rm -v $(pwd)/output:/data ghcr.io/openzim/gutenberg:latest gutenberg2zim -m /data is going to create a ZIM in the output subfolder of current directory (not fully tested, hence the issue to do this correctly, but I do not have time to do it now)

@benoit74
Copy link
Collaborator

benoit74 commented Sep 3, 2024

Please also note the recent warning I've just added on https://github.com/openzim/gutenberg/blob/main/README.md

@benoit74
Copy link
Collaborator

benoit74 commented Sep 3, 2024

But anyway, this will have to be investigated as well: do we have an issue with the tar file?

@benoit74 benoit74 added this to the 2.2.0 milestone Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants