Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-29-2015, 09:41 AM   #1
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
Exclamation Check Book repair function has unexpected file remove side-effect

Today, while fixing some ebook with the Edit Book function, I got the following warning on using the Check Book function:

Code:
WARNING: Invalid id: stärt [OEBPS/metadata.opf]
So I inspected the metadata.opf and found the following:
Code:
<manifest>
    <item href="Text/start.xhtml" id="stärt" media-type="application/xhtml+xml"/>
Check Book explained this as follows:

Code:
The id stärt is not a valid id. IDs must start with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). This is to ensure maximum compatibility with a wide range of devices.
Apparently the "ä" caused some problem (it is a valid letter though), so I tried to repair it with these two options of Check Book:
  • Replace this id with a randomly generated valid id
  • Try to correct all fixable errors automatically

The "repair" in both cases turned out to be the complete removal of the text file where ID stärt refers to.

I admit, the removal "cures" the problem, but I do not think that this is the right solution In particular when you at first are not aware of it and later on seem to have a corrupted e-book with a missing chapter.

Last edited by DrChiper; 07-29-2015 at 01:21 PM.
DrChiper is offline   Reply With Quote
Old 07-29-2015, 10:34 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
accented characters are not in the basic ASCII [A-Za-z]

someone got cute with the id and made it invalid
theducks is offline   Reply With Quote
Old 07-29-2015, 11:40 AM   #3
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
Well, not quite. The original chapter text file name also contained that accented character, so I assume that that was also used to create the ID.

However, my major concern is the ruthless removal of that same chapter text file by Check Book to "cure" the mistake. Coincidentally I noticed it (the files chapter numbering had suddenly a gap) before pressing "save".
DrChiper is offline   Reply With Quote
Old 07-29-2015, 12:05 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by DrChiper View Post
Well, not quite. The original chapter text file name also contained that accented character, so I assume that that was also used to create the ID.

However, my major concern is the ruthless removal of that same chapter text file by Check Book to "cure" the mistake. Coincidentally I noticed it (the files chapter numbering had suddenly a gap) before pressing "save".
definitely issues

Getting rid unsafe (filename) characters is one thing.
Loss of data (file) is not good

Your guess on the ID names is probably good, and a good example why blind faith ID generation is not a good idea.
theducks is offline   Reply With Quote
Old 07-29-2015, 12:07 PM   #5
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
It should definitely not be removing the file, it should be replacing the id with a randomly generated safe id. It's probably because the id in question was in the OPF. Open a bug report and attach the file, I will take a look.
kovidgoyal is online now   Reply With Quote
Old 07-29-2015, 12:16 PM   #6
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
Quote:
Originally Posted by theducks View Post
Getting rid unsafe (filename) characters is one thing.
I checked, but using accented characters like "ä" in xhtml file names does not cause calibre to issue any warning, like for instance spaces certainly will do.

Incidentally, the original ebook was not produced by calibre.
DrChiper is offline   Reply With Quote
Old 07-29-2015, 01:18 PM   #7
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
Submitted Bug #1479462 + attached test file
DrChiper is offline   Reply With Quote
Old 07-29-2015, 03:11 PM   #8
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by DrChiper View Post
I checked, but using accented characters like "ä" in xhtml file names does not cause calibre to issue any warning, like for instance spaces certainly will do.

Incidentally, the original ebook was not produced by calibre.
Not using some things in a book is a best practice, even if EPUB says it is OK
All those lame render engines out there, are the reasons to stay with KISS
theducks is offline   Reply With Quote
Old 08-07-2015, 08:50 AM   #9
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
This bug is indeed fixed now in version 2.34
Thanks Kovid
DrChiper is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unexpected Book downloaded without purchase/request eddomak Kobo Reader 24 07-11-2014 03:52 AM
Name A Book (if any) that had a profound effect on you. Marcus365 General Discussions 43 03-13-2014 12:26 PM
902 Comic book / PB902 side by side comparison Lester Burnham PocketBook 26 10-07-2011 03:35 AM
Weird sunlight side-effect on my K2 delphidb96 Amazon Kindle 5 08-20-2010 08:54 PM
Can you post a list of functions of the bottoms (icons) on the e-ink side here? henry_moh enTourage Archive 4 05-10-2010 12:55 AM


All times are GMT -4. The time now is 10:32 PM.


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