Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-01-2011, 03:12 PM   #1
maximus83
Nameless Being
 
Problem converting large mobi book to epub

I have been using Calibre (v. 0.7.35) to successfully convert a number of non-drm mobi books to epub.

However, I have one mobi book (a Bible) that is 25.3 MB file, and it does not convert successfully to Epub. Calibre runs for a long time and says it finishes ok, but when you look at the file, all it does is create a 25K file with the cover image and no content in it. The Bible file is fairly complex, obviously it has nested TOC's (for book/chapter, etc.), and LOTS of links. Still, despite the complexity of the content this is a commercially produced bible, and the file content and quality in the mobi format is excellent, so I don't believe it's a problem with the input file. The input file content looks great in both my Kindle and in Calibre.

Any ideas why Calibre converts all my other mobi files to epub ok, but not this one? Are there some magical conversion options I need to set to make it work?
  Reply With Quote
Old 01-02-2011, 12:28 AM   #2
maximus83
Nameless Being
 
BTW, I ran the process again and enabled logging. I turned on both the GUI logging mode, and enabled the debug-logging for the specific conversion of the MOBI version to Epub. Conversion still fails, and no error is reported in Calibre during conversion. But after the conversion appears to finish, no content comes through in the resulting Epub file (which is only 25K, rather than the ~ 25 MB that it should be). As you can see below, the log files reveal some problems.

I suspect the issue in this conversion must be due to the Bible's size, rather than to anything else. All my other Mobi-to-Epub conversions worked great, and like I said above, I've already verified that this file is non-DRM'd and that the source file is clean and uncorrupted.

Here are partial log file contents from running the GUI in logging mode:

calibre Debug log
calibre 0.7.36
Windows-7-6.1.7600
Windows
('Windows', '7', '6.1.7600')
Python 2.7.0
Windows: ('7', '6.1.7600', '', 'Multiprocessor Free')
Starting up...
Started up in 12.7660000324
Job: 1 Convert book 1 of 1 (Bible) finished
Convert book 1 of 1 (Bible)
Resolved conversion options
calibre version: 0.7.36
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0.0,
'book_producer': None,
'change_justification': u'original',
'chapter': u"//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part|prologue|epilogue\\s+', 'i')) or @class = 'chapter']",
'chapter_mark': u'pagebreak',
'comments': None,
'cover': 'c:\\users\\UserName\\appdata\\local\\temp\\calibr e_0.7.36_tmp_b4x6aj\\calibre_0.7.36_rwja6u.jpeg',
'debug_pipeline': u'C:\\Users\\UserName\\Calibre-debug',
'disable_font_rescaling': False,
'dont_split_on_page_breaks': False,
'epub_flatten': False,
'extra_css': None,
'extract_to': None,
'flow_size': 260,
'font_size_mapping': None,
'footer_regex': u'(?i)(?<=<hr>)((\\s*<a name=\\d+></a>((<img.+?>)*<br>\\s*)?\\d+<br>\\s*.*?\\s*)|(\\s* <a name=\\d+></a>((<img.+?>)*<br>\\s*)?.*?<br>\\s*\\d+))(?=<br>)' ,
'header_regex': u'(?i)(?<=<hr>)((\\s*<a name=\\d+></a>((<img.+?>)*<br>\\s*)?\\d+<br>\\s*.*?\\s*)|(\\s* <a name=\\d+></a>((<img.+?>)*<br>\\s*)?.*?<br>\\s*\\d+))(?=<br>)' ,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.KindleInput object at 0x05713BD0>,
'insert_blank_line': False,
'insert_metadata': False,
'isbn': None,
'keep_ligatures': False,
'language': None,
'level1_toc': None,
'level2_toc': None,
'level3_toc': None,
'line_height': 0.0,
'linearize_tables': False,
'margin_bottom': 5.0,
'margin_left': 5.0,
'margin_right': 5.0,
'margin_top': 5.0,
'max_toc_links': 50,
'minimum_line_height': 120.0,
'no_chapters_in_toc': False,
'no_default_epub_cover': False,
'no_inline_navbars': False,
'no_svg_cover': False,
'output_profile': <calibre.customize.profiles.KindleOutput object at 0x05713DF0>,
'page_breaks_before': u"//*[name()='h1' or name()='h2']",
'prefer_metadata_cover': False,
'preprocess_html': False,
'preserve_cover_aspect_ratio': False,
'pretty_print': True,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': 'c:\\users\\UserName\\appdata\\local\\temp\\calibr e_0.7.36_tmp_b4x6aj\\calibre_0.7.36_gmvhxn.opf',
'remove_first_image': False,
'remove_footer': False,
'remove_header': False,
'remove_paragraph_spacing': False,
'remove_paragraph_spacing_indent_size': 1.5,
'series': None,
'series_index': None,
'smarten_punctuation': False,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: MOBI Input running
on C:\Users\UserName\Calibre Library\[Remainder of path]
Extracting text...
Adding anchors...
Extracting images...
Cleaning up HTML...
Parsing HTML...
Malformed markup, parsing using BeautifulSoup
Markup contains multiple <html> tags, merging.
Converting style information to CSS...
Creating OPF...
Input debug saved to: C:\Users\UserName\Calibre-debug\input
Parsing all content...
Parsing styles.css ...
Parsing bible.html ...
Forcing bible.html into XHTML namespace
Generating default TOC from spine...
Parsed HTML written to: C:\Users\UserName\Calibre-debug\parsed
Merging user specified metadata...
Detecting structure...
Auto generated TOC with 0 entries.
Structured HTML written to: C:\Users\UserName\Calibre-debug\structure
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Cleaning up manifest...

[I removed a whole bunch of lines here about trimming images.]

Processed HTML written to: C:\Users\UserName\Calibre-debug\processed
Creating EPUB Output...
Rescaling image from 836x1200 to 429x616 cover.jpeg
Looking for large trees in bible.html...
No large trees found
This EPUB file has no Table of Contents. Creating a default TOC
EPUB output written to c:\users\UserName\appdata\local\temp\calibre_0.7.3 6_tmp_b4x6aj\calibre_0.7.36_cfa05l.epub

Last edited by maximus83; 01-02-2011 at 12:31 AM.
  Reply With Quote
Old 01-02-2011, 03:43 AM   #3
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Well, to judge by the log you posted, the conversion finishes successfully. Are you sure there's no ePub entry for that book in your database?
Manichean is offline   Reply With Quote
Old 01-02-2011, 05:02 AM   #4
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by maximus83 View Post
Conversion still fails, and no error is reported in Calibre during conversion.
No error because the conversion finished.

Quote:
Originally Posted by maximus83 View Post
But after the conversion appears to finish, no content comes through in the resulting Epub file (which is only 25K, rather than the ~ 25 MB that it should be).
So the problem isn't that the conversion produced an error it is that the resultant epub has nothing resembling the original book in it.

Quote:
Originally Posted by maximus83 View Post
As you can see below, the log files reveal some problems.
I suspect the biggest problem is the area that you trimmed out.

Quote:
Originally Posted by maximus83 View Post
[I removed a whole bunch of lines here about trimming images.]
How many images were trimmed? You didn't do us any favours by trimming the debug output. It doesn't matter how long it is as long as you either highlight it and wrap the entire log with the code tag (#) or with the spoiler tag (eye with X through it).

Could this book be comprised entirely of images and calibre isn't converting the images correctly?
DoctorOhh is offline   Reply With Quote
Old 01-02-2011, 02:13 PM   #5
maximus83
Nameless Being
 
Quote:
Originally Posted by Manichean View Post
Well, to judge by the log you posted, the conversion finishes successfully. Are you sure there's no ePub entry for that book in your database?
Absolutely. I try to "View specific format" in Calibre, and open the Epub version after running the conversion. It opens ok: and all that is there is the cover image. No content, no links, to TOC, no images.

Calibre is unable to convert this book, with its default settings. My thinking is that either the size of this bible, or the complexity of the nested content, is throwing off the conversion program. Its possible that working extensively with the custom settings in Calibre might do the trick, but I don't have time to work with it for a month just to convert a single book. I'll probably just end up buying an Epub version of this bible as well once I need it.

Thanks.
  Reply With Quote
Old 01-02-2011, 02:21 PM   #6
maximus83
Nameless Being
 
Quote:
Originally Posted by dwanthny View Post
So the problem isn't that the conversion produced an error it is that the resultant epub has nothing resembling the original book in it.
That's true. As I said: There was "no error is reported", but also "no content comes through in the resulting Epub file."


Quote:
Originally Posted by dwanthny View Post
I suspect the biggest problem is the area that you trimmed out.
Could be. All the lines I trimmed out were identical except for the file names, and they all looked like this:

Trimming 'images/00171.jpg' from manifest


If you read in the posted log material, I see some lines near the end that indicate possible problems during the conversion:

Looking for large trees in bible.html...
No large trees found
This EPUB file has no Table of Contents.
  Reply With Quote
Old 01-02-2011, 03:56 PM   #7
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by maximus83 View Post
If you read in the posted log material, I see some lines near the end that indicate possible problems during the conversion:

Looking for large trees in bible.html...
No large trees found
This EPUB file has no Table of Contents.
Those lines indicate nothing of the kind. They're perfectly normal. In fact, the only odd thing I've seen in the logs are the lines you cut from the conversion, where it said it's trimming the images. I suspect dwanthny is right and the book is made up entirely of images.

That said, since you try to convert the bible, why not just pick one that is already converted? There are a few versions floating around on Mobileread alone, try looking in the ebook section.
Manichean is offline   Reply With Quote
Old 01-03-2011, 05:18 PM   #8
maximus83
Nameless Being
 
Quote:
Originally Posted by Manichean View Post
Those lines indicate nothing of the kind. They're perfectly normal. In fact, the only odd thing I've seen in the logs are the lines you cut from the conversion, where it said it's trimming the images. I suspect dwanthny is right and the book is made up entirely of images.
It's true that the CONVERTED book (in Epub format) is made entirely of images. As I mentioned, the converted file contains only the cover image, and no other content.

However, the SOURCE file (which is a .mobi file) can be read just fine in Calibre or in an ebook reader. It contains the full text of the bible, study notes, and of course, many images as well.

Quote:
Originally Posted by Manichean View Post
That said, since you try to convert the bible, why not just pick one that is already converted? There are a few versions floating around on Mobileread alone, try looking in the ebook section.
Agree, makes good sense to me. I decided it wasn't worth fighting this particular battle. Using the various python scripts and Calibre, I was able to liberate and convert all the books that I own to mobi and to epub formats, except for the Bible. And since this study bible is relatively cheap (the Amazon version is like $10, the Epub is more like $15), it's a better use of my time to just buy an epub version.

Thanks everyone for the tips, it was still useful because I learned a lot more about using Calibre, converting books, etc., in the process.
  Reply With Quote
Old 01-03-2011, 05:46 PM   #9
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by maximus83 View Post
However, the SOURCE file (which is a .mobi file) can be read just fine in Calibre or in an ebook reader. It contains the full text of the bible, study notes, and of course, many images as well.
Just because you can read it on ereaders doesn't necessarily imply that it isn't made up of images.

Quote:
Agree, makes good sense to me. I decided it wasn't worth fighting this particular battle. Using the various python scripts and Calibre, I was able to liberate and convert all the books that I own to mobi and to epub formats, except for the Bible. And since this study bible is relatively cheap (the Amazon version is like $10, the Epub is more like $15), it's a better use of my time to just buy an epub version.
I'm saying that you dont need to buy the book, you can get it for free, for example on this very forum. Go check the ebook section.
Manichean is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem converting LDS MOBI file to ePub with Calibre 0.7.29 jbennion Calibre 6 10-21-2012 10:03 PM
list problem when converting epub to mobi (using calibre) bluetux Calibre 0 12-05-2010 10:06 AM
Converting large book (Bible) MI3Guy Calibre 2 06-10-2010 07:23 AM
Problem converting "large" .rtf/.html to .epub gondwild Calibre 3 01-26-2010 08:26 PM
Problem converting large PDFs to EPUB rmolina4819 Calibre 0 12-30-2009 03:36 PM


All times are GMT -4. The time now is 08:11 AM.


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