08-20-2011, 08:19 PM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: Aug 2011
Device: Nook
|
Unable to convert MOBI to EPUB
Hi,
I have a mobi book that I added to Calibre. It took a long time to add, but it added the book, with the metadata. It shows the title, author, size (18.6 MB), etc. The book probably has 10's of thousands of links and I do not want to loose them. If I try to open it, after a very long time, I give-up, and close the window. I was able to successfully convert it to HTML with both mobiunpack.py and mobihuff.py. I can open the resulting HTML in Firefox. However, trying to add the HTML to Calibre give mes: calibre, version 0.8.13 ERROR: Adding failed: The add books process seems to have hung. Try restarting calibre and adding the books in smaller increments, until you find the problem book. I tried using Calibre to convert it to EPUB, HTML, and HTMLZ. Below are the errors for EPUB and HTMLZ. Here is the error for EPUB. calibre, version 0.8.13 ERROR: Conversion Error: <b>Failed</b>: Convert book 1 of 1 (Bible Study Suite) Convert book 1 of 1 (Bible Study Suite) Resolved conversion options calibre version: 0.8.13 {'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\\dpedre~1\\appdata\\local\\temp\\calibr e_0.8.13_tmp_clarcs\\ys6mg8.jpeg', 'debug_pipeline': None, 'dehyphenate': True, 'delete_blank_paragraphs': True, 'disable_font_rescaling': False, 'dont_split_on_page_breaks': False, 'duplicate_links_in_toc': False, 'enable_heuristics': False, 'epub_flatten': False, 'extra_css': None, 'extract_to': None, 'fix_indents': True, 'flow_size': 260, 'font_size_mapping': None, 'format_scene_breaks': True, 'html_unwrap_factor': 0.4, 'input_encoding': None, 'input_profile': <calibre.customize.profiles.InputProfile object at 0x057521D0>, 'insert_blank_line': False, 'insert_blank_line_size': 0.5, 'insert_metadata': False, 'isbn': None, 'italicize_common_cases': True, '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, 'markup_chapter_headings': True, '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.NookOutput object at 0x05752590>, 'page_breaks_before': u"//*[name()='h1' or name()='h2']", 'prefer_metadata_cover': False, 'preserve_cover_aspect_ratio': False, 'pretty_print': True, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': 'c:\\users\\dpedre~1\\appdata\\local\\temp\\calibr e_0.8.13_tmp_clarcs\\zumbt8.opf', 'remove_fake_margins': True, 'remove_first_image': False, 'remove_paragraph_spacing': False, 'remove_paragraph_spacing_indent_size': 1.5, 'renumber_headings': True, 'replace_scene_breaks': u'', 'series': None, 'series_index': None, 'smarten_punctuation': False, 'sr1_replace': None, 'sr1_search': None, 'sr2_replace': None, 'sr2_search': None, 'sr3_replace': None, 'sr3_search': None, 'tags': None, 'timestamp': None, 'title': None, 'title_sort': None, 'toc_filter': None, 'toc_threshold': 6, 'unwrap_lines': True, 'use_auto_toc': False, 'verbose': 2} InputFormatPlugin: MOBI Input running on c:\users\dpedre~1\appdata\local\temp\calibre_0.8.1 3_tmp_clarcs\pvssxz.mobi Extracting text... Adding anchors... Extracting images... Cleaning up HTML... Parsing HTML... Malformed markup, parsing using BeautifulSoup MOBI markup appears to contain random bytes. Stripping. Extracting text... Adding anchors... Python function terminated unexpectedly (Error Code: 1) Traceback (most recent call last): File "site.py", line 132, in main File "site.py", line 109, in run_entry_point File "site-packages\calibre\utils\ipc\worker.py", line 181, in main File "site-packages\calibre\gui2\convert\gui_conversion.py", line 31, in gui_convert_override File "site-packages\calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert File "site-packages\calibre\ebooks\conversion\plumber.py", line 937, in run File "site-packages\calibre\customize\conversion.py", line 204, in __call__ File "site-packages\calibre\ebooks\mobi\input.py", line 27, in convert File "site-packages\calibre\ebooks\mobi\reader.py", line 325, in extract_content File "re.py", line 151, in sub MemoryError Here is the error for HTMLZ. calibre, version 0.8.13 ERROR: Conversion Error: <b>Failed</b>: Convert book 1 of 1 (Bible Study Suite) Convert book 1 of 1 (Bible Study Suite) Resolved conversion options calibre version: 0.8.13 {'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\\dpedre~1\\appdata\\local\\temp\\calibr e_0.8.13_tmp_clarcs\\ds0ibo.jpeg', 'debug_pipeline': None, 'dehyphenate': True, 'delete_blank_paragraphs': True, 'disable_font_rescaling': False, 'duplicate_links_in_toc': False, 'enable_heuristics': False, 'extra_css': None, 'fix_indents': True, 'font_size_mapping': None, 'format_scene_breaks': True, 'html_unwrap_factor': 0.4, 'htmlz_class_style': u'external', 'htmlz_css_type': u'class', 'input_encoding': None, 'input_profile': <calibre.customize.profiles.InputProfile object at 0x057861B0>, 'insert_blank_line': False, 'insert_blank_line_size': 0.5, 'insert_metadata': False, 'isbn': None, 'italicize_common_cases': True, '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, 'markup_chapter_headings': True, 'max_toc_links': 50, 'minimum_line_height': 120.0, 'no_chapters_in_toc': False, 'no_inline_navbars': False, 'output_profile': <calibre.customize.profiles.NookOutput object at 0x05786570>, 'page_breaks_before': u"//*[name()='h1' or name()='h2']", 'prefer_metadata_cover': False, 'pretty_print': False, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': 'c:\\users\\dpedre~1\\appdata\\local\\temp\\calibr e_0.8.13_tmp_clarcs\\x6mu_p.opf', 'remove_fake_margins': True, 'remove_first_image': False, 'remove_paragraph_spacing': False, 'remove_paragraph_spacing_indent_size': 1.5, 'renumber_headings': True, 'replace_scene_breaks': u'', 'series': None, 'series_index': None, 'smarten_punctuation': False, 'sr1_replace': None, 'sr1_search': None, 'sr2_replace': None, 'sr2_search': None, 'sr3_replace': None, 'sr3_search': None, 'tags': None, 'timestamp': None, 'title': None, 'title_sort': None, 'toc_filter': None, 'toc_threshold': 6, 'unwrap_lines': True, 'use_auto_toc': False, 'verbose': 2} InputFormatPlugin: MOBI Input running on c:\users\dpedre~1\appdata\local\temp\calibre_0.8.1 3_tmp_clarcs\j_zfig.mobi Extracting text... Adding anchors... Extracting images... Cleaning up HTML... Parsing HTML... Malformed markup, parsing using BeautifulSoup MOBI markup appears to contain random bytes. Stripping. Extracting text... Adding anchors... Python function terminated unexpectedly (Error Code: 1) Traceback (most recent call last): File "site.py", line 132, in main File "site.py", line 109, in run_entry_point File "site-packages\calibre\utils\ipc\worker.py", line 181, in main File "site-packages\calibre\gui2\convert\gui_conversion.py", line 31, in gui_convert_override File "site-packages\calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert File "site-packages\calibre\ebooks\conversion\plumber.py", line 937, in run File "site-packages\calibre\customize\conversion.py", line 204, in __call__ File "site-packages\calibre\ebooks\mobi\input.py", line 27, in convert File "site-packages\calibre\ebooks\mobi\reader.py", line 325, in extract_content File "re.py", line 151, in sub MemoryError |
08-20-2011, 11:15 PM | #2 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
It's running out of memory because of your 10s of thousands of links. You probably need more memory - a lot more memory.
There's a small chance that there is some memory leak associated with the file, but you'd need to submit a bug the bug tracker for that to be investigated: https://bugs.launchpad.net/calibre |
Advert | |
|
08-20-2011, 11:43 PM | #3 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That's a memory error in while running a regex on the html to replace html entities. There's no fix for that.
|
08-21-2011, 10:16 AM | #4 |
Junior Member
Posts: 3
Karma: 10
Join Date: Aug 2011
Device: Nook
|
Reply to kovidgoyal
kovidgoyal,
I was not able to import the HTML version. That error was from converting the MOBI to EPUB. Will more memory fix the problem? I can open the MOBI in Kindle for PC, but not Calibre. And I can open the HTML in Firefox, but I cannot add it to Calibre. Thanks, D. |
08-21-2011, 11:38 AM | #5 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, the only way to use this file in calibre is to split the html into smaller chunks manually and remove most of the CSS. calibre's ebooks utilities are not designed to minimize memory usage, trying to process large chunks of HTML like this file, is not going to work.
|
Advert | |
|
08-21-2011, 04:04 PM | #6 |
Junior Member
Posts: 3
Karma: 10
Join Date: Aug 2011
Device: Nook
|
kovidgoyal,
I am trying eCub, which requires mobi2oeb from Calibre. I have the latest, portable version of Calibre, which does not seem to have mobi2oeb. Is there some place that I can download this? Thanks, David |
08-21-2011, 04:45 PM | #7 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
As far as I know that program is no longer part of Calibre and has not been for some time. I am guessing that it dates back to the 0.6 series (or earlier) which is something like 100 releases ago. All the functionality of the xxx2yyy type programs was subsumed into ebook-convert when the Calibre conversion engine was reworked to use a plug-in architecture.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unable to convert Mobi to Epub | Japes | Conversion | 27 | 07-19-2011 12:14 AM |
Unable to convert to MOBI | chota | Conversion | 7 | 03-06-2011 06:19 AM |
PRS-700 Unable to convert pdf to other formats (epub/rtf/doc) | testndtv | Sony Reader | 1 | 09-24-2010 01:45 PM |
Unable to convert RTF files to ePub | Chrysanthemum | Calibre | 14 | 07-07-2010 01:57 PM |
Unable Convert Gutenberg TXT to Mobi | ascherjim | Calibre | 4 | 06-23-2009 08:55 AM |