Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 01-18-2021, 09:03 AM   #1
thorindwarf
Enthusiast
thorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to behold
 
thorindwarf's Avatar
 
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
thorindwarf is offline   Reply With Quote
Old 01-18-2021, 09:42 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Advert
Old 01-22-2021, 02:40 AM   #3
thorindwarf
Enthusiast
thorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to behold
 
thorindwarf's Avatar
 
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"/>
Every other reader that I tried opens the files with no issues. This only happens with Calibre new viewer.
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
thorindwarf is offline   Reply With Quote
Old 01-22-2021, 05:20 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Old 01-22-2021, 11:41 AM   #5
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
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:
The OCF Abstract Container file system model uses a single common Root Directory for all of the contents. All Local Resources for the EPUB Publication are located within the directory tree headed by the Root Directory, but no specific file system structure for them is mandated by this specification.

The file system model also includes a mandatory directory named META-INF that is a direct child of the Root Directory and is used to store the following special files:

container.xml [required]
Identifies the Package Documents that define each Rendition of the EPUB Publication.

signatures.xml [optional]
Contains digital signatures for various assets.

encryption.xml [optional]
Contains information about the encryption of Publication Resources. This file is mandatory when obfuscation is used.

metadata.xml [optional]
Used to store metadata about the OCF ZIP Container.

rights.xml [optional]
Used to store information about digital rights.

manifest.xml [optional]
A manifest of container contents as allowed by Open Document Format [ODF].

Conformance requirements for the various files in the META-INF directory are defined in META-INF Directory.

Last edited by DNSB; 01-22-2021 at 11:44 AM.
DNSB is offline   Reply With Quote
Advert
Old 02-05-2021, 01:59 AM   #6
thorindwarf
Enthusiast
thorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to beholdthorindwarf is a marvel to behold
 
thorindwarf's Avatar
 
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:
3.5.1 Inclusion
All OCF Abstract Containers MUST include a directory called META-INF in their Root Directory.

This directory contains the files specified in META-INF Reserved Files. Files other than the ones listed in that section MAY be included in the META-INF directory; OCF Processors MUST NOT fail when encountering such files.
This said I think any OCF Processor must do its best to find the properly referenced files no regardless of their location. Like all other epub readers do.

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?
thorindwarf is offline   Reply With Quote
Old 02-05-2021, 02:02 AM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 02:34 AM.


MobileRead.com is a privately owned, operated and funded community.