![]() |
#1 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31
Karma: 11958
Join Date: Jul 2013
Device: Kobo Glo
|
Opening EPUB - ValueError - No file named
Hi!
I noticed the error below for many books in my Library which were working fine with the old version of the Viewer. What is common with them is that all files inside epub are in META-INF directory. If I change all the files to be in e.g. OEBPS/ and only container.xml to reside in META-INF/ then Viewer is able to open the book. Attaching a book epubs.zip in both variants. Please check it ![]() Thanks! calibre, version 5.9.0 ERROR: Unhandled error: Uncaught ValueError: No file named META-INF/titlepage.xhtml in the book manifest<br><span style="font-size:smaller">Error at userscript:viewer.js:44135:17</span> Traceback (most recent call last): at View.display_book (userscript:viewer.js:43193:39) at View.ρσ_interpolate_kwargs (userscript:viewer.js:2635:18) at View.show_name (userscript:viewer.js:43321:18) at View.load_doc (userscript:viewer.js:43340:13) at load_resources (userscript:viewer.js:16956:13) at do_one (userscript:viewer.js:16908:31) at Object.get_file (userscript:viewer.js:44135:23) Error |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You have placed the content.opf inside META-INF, it should be in the root of the epub or in some other folder, paths inside the content.opf are relative to the folder it is in. So move it out to th eroot and you will be fine.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31
Karma: 11958
Join Date: Jul 2013
Device: Kobo Glo
|
I moved it to the root (of course Calibre changed all the paths inside files) - the same problem.
I don't think the problem is with the relative paths as I said if the files are placed in another directory along with the opf file then there is no problem with Calibre viewer. container.xml points with the full path to opf file and from there on there should be no matter if directory is named meta-inf or whatever. The paths are indeed relatively specified in opf file like this and they are in the opf's directory: Code:
<item href="titlepage.xhtml" id="titlepage" media-type="application/xhtml+xml"/> <item href="Maikite_-_Teodora_Dimova_-_4eti.me_split_000.htm" id="html10" media-type="application/xhtml+xml"/> <item href="Maikite_-_Teodora_Dimova_-_4eti.me_split_001.htm" id="html9" media-type="application/xhtml+xml"/> E.g. Moon Reader+, AlReader, FBReader, CoolReader (desktop and mobile version) open the files correctly. Last edited by thorindwarf; 01-22-2021 at 04:08 AM. Reason: more info |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Simply do not put content files in META-INF, that is invalid. That it works in some readers doesnt make it less invalid. You cant do that and expect your epub to work anywhere.
|
![]() |
![]() |
![]() |
#5 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,210
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
For what it's worth, the epub specification allows the following files to be placed in the meta-inf directory. Any other files make this an invalid epub file.
Quote:
Last edited by DNSB; 01-22-2021 at 11:44 AM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31
Karma: 11958
Join Date: Jul 2013
Device: Kobo Glo
|
DNSB, I don't think placing other files in META-INF directory makes it invalid epub as it is stated in the specification as well:
Quote:
Am I supposed to edit the structure of hundreds of epubs in my library just to be able to open them in Calibre's new viewer? How would you do this kind of exercise? |
|
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Just do an epub to azw3 to epub bulk conversion in calibre that will take care of it. Or maybe even and epub to epub conversion, though less sure about that.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ValueError: Not a ZIP file | gianni_fed | Calibre | 23 | 03-26-2020 10:24 PM |
Moving and Opening an EPub NoDRM File from PC to IPAD2 | GroovyGuy | Apple Devices | 4 | 06-17-2015 12:31 PM |
PRS-T1 Opening an Epub file fails | real_yoni | Sony Reader | 10 | 09-16-2014 07:48 AM |
Saving to disk -> ValueError: I/O operation on closed file | Backi | Calibre | 2 | 05-05-2012 02:29 PM |
Manually opening epub file on Mac problems | slantybard | Calibre | 2 | 08-29-2009 01:09 PM |