Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 01-14-2021, 12:47 AM   #1
4rm
Junior Member
4rm began at the beginning.
 
4rm's Avatar
 
Posts: 7
Karma: 10
Join Date: Jan 2021
Device: Kobo Aura One
Unable to open .epub I've created in Calibre

I've created an ePub in Calibre 4.23 from OCR'd scanned images, and everything looks good on my computer. Calibre reports no errors with the ePub, and the ePub Validator reports no errors either. I'm able to open and read the ePub in SumatraPDF and Calibre just fine.

However, if I try opening the ePub on my Aura One, it freezes for ~30s before rebooting itself. I never even see the cover. The file is 6.94MB for ~600 pages, and I haven't had any problems in the past opening similarly sized books (as far as I can remember).

This is my first time trying to create an ePub, so I'm not sure what to test. I couldn't find any error logs on the ereader, and otherwise, it has no problems opening any other ePubs.

I would love to share the ePub in question, but I'm not sure if that's allowed. Please let me know if it is, and I'll upload it. It's a scanned version of a book that was published relatively recently (2014).

Unfortunately, since I'm so new, I'm not even sure what information is relevant. Please let me know if there's any log files, config files, or anything else that could help troubleshoot.

Thank you!
4rm is offline   Reply With Quote
Old 01-14-2021, 06:00 AM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
That sounds like a reboot because the process watcher (called sickel) decided a process had hung. And at a guess, it is probably to do with the structure of the epub.

In the book, did you put all the images into a single internal file? If so, it is probably hanging while trying to render the file with all those images. I have tested this and it rebooted the device as described. Putting the images in separate files, or in smaller groups will work.
davidfor is offline   Reply With Quote
Advert
Old 01-14-2021, 07:17 AM   #3
Dr. Drib
Grand Sorcerer
Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.
 
Dr. Drib's Avatar
 
Posts: 44,743
Karma: 55645321
Join Date: Jan 2007
Location: Peru
Device: Kindle: Oasis 3, Voyage WiFi; Kobo: Libra 2, Aura One
If the book/epub under question is copyrighted, then you are not allowed to upload or share the ebook or the PDF file.
Dr. Drib is offline   Reply With Quote
Old 01-14-2021, 12:14 PM   #4
4rm
Junior Member
4rm began at the beginning.
 
4rm's Avatar
 
Posts: 7
Karma: 10
Join Date: Jan 2021
Device: Kobo Aura One
Quote:
Originally Posted by Dr. Drib View Post
If the book/epub under question is copyrighted, then you are not allowed to upload or share the ebook or the PDF file.
Ah, okay. No worries then, I won't upload.

Quote:
Originally Posted by davidfor View Post
That sounds like a reboot because the process watcher (called sickel) decided a process had hung. And at a guess, it is probably to do with the structure of the epub.

In the book, did you put all the images into a single internal file? If so, it is probably hanging while trying to render the file with all those images. I have tested this and it rebooted the device as described. Putting the images in separate files, or in smaller groups will work.
Thanks for your help! The images are all separate files; there are 89 of them, with the largest being ~700kb. Most are very small, ~50kb, though.

Maybe there are too many internal files? Alongside the 89 images, there are 640 text files (each around ~20kb). I'm not sure if that falls into an acceptable range.

I did have some luck after using kepubify — the resulting kepub was able to be opened on my Kobo — but I would like to fix the ePub since it's a more universal format. I'm not very familiar with the kepub format however, so I don't know what it really changed to make it work. I think it does tell me that the number of files is not the problem, since the ePub and kepub both have the same amount, but then I'm at a loss for what to fix.

Thanks again for your help!
4rm is offline   Reply With Quote
Old 01-14-2021, 01:19 PM   #5
4rm
Junior Member
4rm began at the beginning.
 
4rm's Avatar
 
Posts: 7
Karma: 10
Join Date: Jan 2021
Device: Kobo Aura One
Quote:
Originally Posted by 4rm View Post
I did have some luck after using kepubify — the resulting kepub was able to be opened on my Kobo — [..]
Sorry, unable to edit my posts just yet so I'll update in a new message. I tried simply renaming my .kepub.epub to just .epub, and it then stopped working again. Still clueless as to what's making it work with .kepub but not .epub
4rm is offline   Reply With Quote
Advert
Old 01-14-2021, 01:26 PM   #6
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 10,129
Karma: 224760044
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Quote:
Originally Posted by 4rm View Post
Ah, okay. No worries then, I won't upload.



Thanks for your help! The images are all separate files; there are 89 of them, with the largest being ~700kb. Most are very small, ~50kb, though.

Maybe there are too many internal files? Alongside the 89 images, there are 640 text files (each around ~20kb). I'm not sure if that falls into an acceptable range.

I did have some luck after using kepubify — the resulting kepub was able to be opened on my Kobo — but I would like to fix the ePub since it's a more universal format. I'm not very familiar with the kepub format however, so I don't know what it really changed to make it work. I think it does tell me that the number of files is not the problem, since the ePub and kepub both have the same amount, but then I'm at a loss for what to fix.

Thanks again for your help!
What happens if you do a conversion from epub to epub? Sometimes a Calibre conversion helps in such cases.
Sirtel is offline   Reply With Quote
Old 01-14-2021, 01:47 PM   #7
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: 35,380
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
The differences between a kepub and epub are pretty minor mostly involving a mass of added spans. The real difference is that epub files are rendered by Adobe's RMSDK while kepubs are rendered by a webkit based epub3 renderer.

Since you are using calibre, you might want to add the ScrambleEbook plugin, scramble the ebook and then attach it to a message.
DNSB is offline   Reply With Quote
Old 01-14-2021, 05:12 PM   #8
4rm
Junior Member
4rm began at the beginning.
 
4rm's Avatar
 
Posts: 7
Karma: 10
Join Date: Jan 2021
Device: Kobo Aura One
Quote:
Originally Posted by Sirtel View Post
What happens if you do a conversion from epub to epub? Sometimes a Calibre conversion helps in such cases.
After the conversion, I'm able to open the ebook on my Kobo, but only to the cover. If I try turning the page, everything crashes and the ereader restarts. Are there any settings I should look out for? I kept everything default except the "Detect chapters at..." setting.
4rm is offline   Reply With Quote
Old 01-14-2021, 05:33 PM   #9
4rm
Junior Member
4rm began at the beginning.
 
4rm's Avatar
 
Posts: 7
Karma: 10
Join Date: Jan 2021
Device: Kobo Aura One
Quote:
Originally Posted by DNSB View Post
The differences between a kepub and epub are pretty minor mostly involving a mass of added spans. The real difference is that epub files are rendered by Adobe's RMSDK while kepubs are rendered by a webkit based epub3 renderer.

Since you are using calibre, you might want to add the ScrambleEbook plugin, scramble the ebook and then attach it to a message.
Thanks for pointing me to ScrambleEbook. I've attached the scrambled ebooks below. I tested the scambled ebooks' compatibility, and it mirrors the unscrambled ebooks: The original and Twice_converted ebooks fail to open and crash the ereader, and the kepub opens and runs correctly.
Attached Files
File Type: epub kepub_scrambled.kepub.epub (6.01 MB, 97 views)
File Type: epub original_scrambled.epub (5.33 MB, 105 views)
File Type: epub Twice_converted_scrambled.epub (5.32 MB, 81 views)
4rm is offline   Reply With Quote
Old 01-14-2021, 06:24 PM   #10
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by 4rm View Post
Thanks for pointing me to ScrambleEbook. I've attached the scrambled ebooks below. I tested the scambled ebooks' compatibility, and it mirrors the unscrambled ebooks: The original and Twice_converted ebooks fail to open and crash the ereader, and the kepub opens and runs correctly.
I have to say "WOW!!!!" In the last few days I looked at a book and declared it was the worst coded book I have ever seen. Compared to this one, that book was well coded.

I looked at the epub version before putting it on one of my ereaders. It was obvious what the problem was. Everything is wrapped in spans. Almost every word is in its own span. Almost every space was in its own span. And there are over 42000 classes in the stylesheet. 35693 of them are named "text_nnnnn" and are used in those spans. Most of these are almost identical. They set colours that are almost identical, or set the letter spacing or something else that probably isn't needed.

I am completely sure that this is failing because it is just taking to long to render the book because there is just to much in it. I have it opened in the calibre editor and have been running a "beautify" on it for the last 20 minutes. That's on a laptop with an i7 and 16GB of memory.

You said it was a OCRed from scans. I think you need to look at the options in the OCR program and turn off whatever is doing the above. The text colour and letter spacing isn't needed. Or maybe have it produce an DOCX or similar and do the cleanup there. You can edit the epub, but, it will take time.
davidfor is offline   Reply With Quote
Old 01-14-2021, 06:34 PM   #11
4rm
Junior Member
4rm began at the beginning.
 
4rm's Avatar
 
Posts: 7
Karma: 10
Join Date: Jan 2021
Device: Kobo Aura One
Quote:
Originally Posted by davidfor View Post
I have to say "WOW!!!!" In the last few days I looked at a book and declared it was the worst coded book I have ever seen. Compared to this one, that book was well coded.

I looked at the epub version before putting it on one of my ereaders. It was obvious what the problem was. Everything is wrapped in spans. Almost every word is in its own span. Almost every space was in its own span. And there are over 42000 classes in the stylesheet. 35693 of them are named "text_nnnnn" and are used in those spans. Most of these are almost identical. They set colours that are almost identical, or set the letter spacing or something else that probably isn't needed.

I am completely sure that this is failing because it is just taking to long to render the book because there is just to much in it. I have it opened in the calibre editor and have been running a "beautify" on it for the last 20 minutes. That's on a laptop with an i7 and 16GB of memory.

You said it was a OCRed from scans. I think you need to look at the options in the OCR program and turn off whatever is doing the above. The text colour and letter spacing isn't needed. Or maybe have it produce an DOCX or similar and do the cleanup there. You can edit the epub, but, it will take time.
I agree, it's quite ugly. I (I suppose mistakenly) assumed that this was just what was to be expected from converting scans to epubs. And it does make sense that an epub coded this way would not work, but it then confuses me how the .kepub works, and without any real slowdown (I was under the impression that they were nearly the same thing).

For now, I guess I'll try converting the scans using better OCR settings. This epub was created via Scans -> .PDF -> .docx with Adobe Acrobat XI Pro -> ePub with Calibre. I really have no idea why each word is in its own span, but I'll look more closely now to see where things might be going haywire. Thanks all for the help.
4rm is offline   Reply With Quote
Old 01-14-2021, 08:17 PM   #12
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
Quote:
Originally Posted by davidfor View Post
I have to say "WOW!!!!" In the last few days I looked at a book and declared it was the worst coded book I have ever seen. Compared to this one, that book was well coded.
I just had to look at it after that .

It is salvageable using regex that might be quicker than starting over. I first used regex to remove all span classes (with <span class="text_(.*?)"> and </span> ) and replaced with nothing. There were over 339k of them btw. That just took a few seconds.

Do the same to get rid of all the <p class="block_xxxx"> and replace it with a single sensible text option for now to whatever your preference is. Eliminate all the now unused styles, etc. I was wondering why the stylesheet.css wasn't loading. When it finally did, I looked and there were 238k lines in the file.

Then go through to do chapter titles, etc. in whatever style you want.

It's still work, but might be quicker than starting over.
Ripplinger is offline   Reply With Quote
Old 01-14-2021, 10:00 PM   #13
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: 35,380
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Ripplinger View Post
I just had to look at it after that .

It is salvageable using regex that might be quicker than starting over. I first used regex to remove all span classes (with <span class="text_(.*?)"> and </span> ) and replaced with nothing. There were over 339k of them btw. That just took a few seconds.

Do the same to get rid of all the <p class="block_xxxx"> and replace it with a single sensible text option for now to whatever your preference is. Eliminate all the now unused styles, etc. I was wondering why the stylesheet.css wasn't loading. When it finally did, I looked and there were 238k lines in the file.

Then go through to do chapter titles, etc. in whatever style you want.

It's still work, but might be quicker than starting over.
You might not want to remove all the text_ spans since many of them involved italics and font sizes. Yeah, a 4.4MB stylesheet is a bit larger than usual--more precisely, I opened 20 random epubs in 7Zip and their combined stylesheets didn't add up to 2MB.

The other major change I would make is combining the individual page per file into multipage chapters.
DNSB is offline   Reply With Quote
Old 01-15-2021, 02:28 AM   #14
4rm
Junior Member
4rm began at the beginning.
 
4rm's Avatar
 
Posts: 7
Karma: 10
Join Date: Jan 2021
Device: Kobo Aura One
Thank you all for your help. I ended up opting to completely start over, in hopes that I end up with a better starting point before having to manually edit. I did a lot more cleaning up on the images themselves (cropping edges, headers, etc), and used ABBYY FineReader for OCR + .epub conversion this time (instead of Acrobat + Calibre). Now, the resulting .epub was clean, (relatively) concise, quick to load, under 1MB, and most importantly, opened up just fine on my ereader.

I'm a bit embarrassed to have uploaded what seems to be the worst formatted .epub ever seen (), but I'm happy to have learned from it and hopefully I know enough now not to make the same mistakes twice.

Thanks again for all your assistance and guidance! Now I'm off to finally enjoy my book
4rm is offline   Reply With Quote
Old 02-04-2021, 06:34 PM   #15
Readirect
Zealot
Readirect can self-interpret dreams as they happen.Readirect can self-interpret dreams as they happen.Readirect can self-interpret dreams as they happen.Readirect can self-interpret dreams as they happen.Readirect can self-interpret dreams as they happen.Readirect can self-interpret dreams as they happen.Readirect can self-interpret dreams as they happen.Readirect can self-interpret dreams as they happen.Readirect can self-interpret dreams as they happen.Readirect can self-interpret dreams as they happen.Readirect can self-interpret dreams as they happen.
 
Posts: 130
Karma: 20456
Join Date: Apr 2014
Device: KPW1
Guessing that the problem is with splits in the epub file. In the Calibre epub conversion menu, select epub output from the left menu and make sure "split files larger than" has an entry of 260kb. This fixed a(n identical) problem to yours that I had.

If this isn't the problem, I've sometimes fixed a (similar) issue by converting to another format (like kepub, mobi, etc.) then re-converting back to epub.

If none of that works, it might be the particular file. Epub can be finicky handling graphics (which is what your entire ebook is.) A work-around would be to use an OCR app to convert the file to text.
Readirect is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to open .mobi or .epub in windows eloigorri Calibre 11 06-18-2020 06:06 AM
Can't open mobi ebooks created with calibre on kindle pw Mantinholding Amazon Kindle 7 02-25-2015 06:06 AM
Unable to open my epub files (7.4) under fedora. Andjety Sigil 14 01-05-2014 06:54 PM
Sony PRS T-1 won't open epub created from zip file steinarb Conversion 10 11-09-2012 08:18 AM
Unable to open Epub books on Nook ST judyb Barnes & Noble NOOK 3 07-26-2012 08:09 AM


All times are GMT -4. The time now is 01:49 PM.


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