View Single Post
Old 09-10-2024, 10:40 PM   #1
fredex
Enthusiast
fredex began at the beginning.
 
Posts: 42
Karma: 10
Join Date: Aug 2014
Device: none
epub manufactured from kobo download

I bought a book from kobo using the kobo app on my phone. it downloads a bunch of directories and files, so that with only a modest amount of hacking I could make a zip file of it, rename .zip ==> .epub and calibre imports it nicely. It also is readable, and one can edit the metadata.

what I CANNOT do is edit the book text itself. it gives me this error:

Quote:
Traceback (most recent call last):
File "calibre/gui2/tweak_book/job.py", line 33, in run
File "calibre/gui2/tweak_book/boss.py", line 101, in get_container
File "calibre/ebooks/oeb/polish/container.py", line 1598, in get_container
File "calibre/ebooks/oeb/polish/container.py", line 1217, in __init__
calibre.ebooks.oeb.polish.container.InvalidEpub: OPF file does not exist at location pointed to by META-INF/container.xml
however the OPF file DOES exist and it is exactly where container.xml says it should be.

now, the structure of this epub is a little odd, I assume because it isn't generated by Calibre, but since Calibre can display it for reading it doesn't seem to me to be wrong, per se.

I went and run epubcheck against it and got two errors (plus about a bazillion of the same warning over and over). The first error is:

Quote:
ERROR(PKG-006): /home/fredex/Calibre Library/Ben Aaronovitch/Masquerades of Spring (940)/Masquerades of Spring - Ben Aaronovitch.epub//home/fredex/Calibre%20Library/Ben%20Aaronovitch/Masquerades%20of%20Spring%20(940)/Masquerades%20of%20Spring%20-%20Ben%20Aaronovitch.epub(-1,-1): Mimetype file entry is missing or is not the first file in the archive.
and the second error is:

[QUOTE]FATAL(OPF-002): /home/fredex/Calibre Library/Ben Aaronovitch/Masquerades of Spring (940)/Masquerades of Spring - Ben Aaronovitch.epub/META-INF/container.xml(-1,-1): The OPF file "https://46b164ee-6bef-494a-b1f5-711309832c65.epubcheck.w3c.org/OEBPS/content.opf" was not found in the EPUB./[QUOTE]

the first attachment is the top-level directory in the epub file, showing the mimetype file.
attachment 2 is the META-INF directory.
attachment 3 is the contents of the container.xml file in the META-INF directory.

So, it looks to my (uneducated eyes) as if the files are where they should be.

I'd appreciate any guidance you folks can offer me on this.

Thanks in advance!

Fred
Attached Thumbnails
Click image for larger version

Name:	Screenshot at 2024-09-10 22-23-09.png
Views:	209
Size:	48.4 KB
ID:	210751   Click image for larger version

Name:	Screenshot at 2024-09-10 22-30-24.png
Views:	226
Size:	47.7 KB
ID:	210752   Click image for larger version

Name:	Screenshot at 2024-09-10 22-34-13.png
Views:	219
Size:	73.3 KB
ID:	210753  
fredex is offline   Reply With Quote