![]() |
#1 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: May 2025
Device: Calibre
|
Error opening rezipped or open Epub file
Keep getting this error when trying to edit a re-zipped EPUB, or open the unzipped folder to edit.
calibre, version 8.4.0 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 1637, in get_container File "calibre\ebooks\oeb\polish\container.py", line 1226, in __init__ calibre.ebooks.oeb.polish.container.InvalidEpub: META-INF/container.xml contains no link to OPF file There is an OPF file, and a META-INF file, and the container.xml seems to have a link to the OPF file XML File <?xml version="1.0" encoding="UTF-8"?><container xmlns="urn ![]() ![]() <rootfiles xmlns=""> <rootfile full-path="OPS/package.opf" media-type="application/oebps-package+xml"/> </rootfiles> </container> How to fix? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,242
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
that error indicates you have broken your epub file. I suggest you use the edit book tool rather than trying to hand edit epub files.
|
![]() |
![]() |
![]() |
#3 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: May 2025
Device: Calibre
|
I got the original as an extracted Epub file, so I am trying to turn it back into an epub file. When I try to add it to calibre with Multiple folders, it does not recognize the book properly
|
![]() |
![]() |
![]() |
#4 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,210
Karma: 168808723
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Going by the spec, the mimetype file must be in the root of the archive and not compressed. The container.xml file must be in the META-INF directory. The other files can be in the root of the .zip container or in subdirectories. However the container.xml has the path to the .opf file. In your case, the package.ofp file must in the OPS directory which must be in the root of the .zip container. I've attached some images from opening an ePub file using 7-Zip (first is the root of the .zip container then the contents of the OEBPS directory and then the container.xml file open in an editor. If you manually re-zip an unzipped ePub, you will need to add the mimetype file uncompressed first and then the remainder of the files in the same directory structure as the original ePub since that structure will be used for all the paths. Please do not tell us just where you got an ePub as an unzipped file. Last edited by DNSB; 05-21-2025 at 01:35 AM. |
|
![]() |
![]() |
![]() |
#5 | |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,242
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
ebook-convert /path/to/opf/file.opf output.epub that should take care of it. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error opening saved file | helens | Sigil | 16 | 04-23-2023 12:41 PM |
ePub3 to Mobi Error - Error(prcgen):E21027: Epub file has more than one opf file | dtsmith | Kindle Formats | 4 | 01-30-2018 11:20 AM |
error opening a LIT file | mfsav2 | Conversion | 5 | 04-13-2013 09:16 PM |
Keep getting "Page Error" on epub file when I open it on my PRS-300 (filesize > 25MB) | ryancolm | Sigil | 6 | 09-03-2010 10:45 AM |
Error when opening lit file | thfc2008 | Other formats | 7 | 11-25-2008 06:55 PM |