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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-28-2025, 08:17 PM   #1
markvdvelde
Connoisseur
markvdvelde began at the beginning.
 
Posts: 57
Karma: 12
Join Date: Jan 2011
Device: Kindle
Question Conversion from xhtml to mobi fails

Hi all,
Using pyglossary I converted a dsl file to mobi and got a folder ("OEBPS") containing 1 opf file and lots of xhtml files. (I followed these instructions.) The last step is opening the opf file in Kindle Previewer and exporting the result to .mobi. However, when I open the opf file in Previewer, I get the following message: "Preview not supported in this device mode for the book. Switching to Tablet". And with Previewer switched to Tablet mode, all export options are greyed out.

Next I tried Calibre. I zipped the folder and added it to my library. But when I tried to convert it to .mobi, Calibre told me the following:

calibre, version 7.22.0 (win32, embedded-python: True)
Conversion error: Failed: Convert book 1 of 1 (Diccionario de uso del español María Moliner)

Spoiler:
Convert book 1 of 1 (Diccionario de uso del español María Moliner)
Processing archive...
Conversion options changed from defaults:
read_metadata_from_opf: 'C:\\Users\\markv\\AppData\\Local\\Temp\\calibre_g 52i38ui\\88a2m23s.opf'
no_inline_toc: True
verbose: 2
output_profile: 'kindle_pw3'
Resolved conversion options
calibre version: 7.22.0
{'add_alt_text_to_img': False,
'allow_local_files_outside_root': False,
'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0.0,
'book_producer': None,
'breadth_first': False,
'change_justification': 'original',
'chapter': "//*[((name()='h1' or name()='h2') and re:test(., "
"'\\s*((chapter|book|section|part)\\s+)|((prolog|p rologue|epilogue)(\\s+|$))', "
"'i')) or @class = 'chapter']",
'chapter_mark': 'pagebreak',
'comments': None,
'cover': None,
'debug_pipeline': None,
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'dont_compress': False,
'dont_package': False,
'duplicate_links_in_toc': False,
'embed_all_fonts': False,
'embed_font_family': None,
'enable_heuristics': False,
'expand_css': False,
'extra_css': None,
'extract_to': None,
'filter_css': '',
'fix_indents': True,
'font_size_mapping': None,
'format_scene_breaks': True,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x000001F44A956810>,
'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_levels': 5,
'max_toc_links': 50,
'minimum_line_height': 120.0,
'mobi_file_type': 'old',
'mobi_ignore_margins': False,
'mobi_keep_original_images': False,
'mobi_toc_at_start': False,
'no_chapters_in_toc': False,
'no_inline_navbars': True,
'no_inline_toc': True,
'output_profile': <calibre.customize.profiles.KindlePaperWhite3Outpu t object at 0x000001F44A34D150>,
'page_breaks_before': "//*[name()='h1' or name()='h2']",
'personal_doc': '[PDOC]',
'prefer_author_sort': False,
'prefer_metadata_cover': False,
'pretty_print': False,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': 'C:\\Users\\markv\\AppData\\Local\\Temp\\calibre_g 52i38ui\\88a2m23s.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': '',
'search_replace': '[]',
'series': None,
'series_index': None,
'share_not_sync': False,
'smarten_punctuation': False,
'sr1_replace': None,
'sr1_search': None,
'sr2_replace': None,
'sr2_search': None,
'sr3_replace': None,
'sr3_search': None,
'start_reading_at': None,
'subset_embedded_fonts': False,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'toc_title': None,
'transform_css_rules': '[]',
'transform_html_rules': '[]',
'unsmarten_punctuation': False,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: HTML Input running
on C:\Users\markv\AppData\Local\Temp\calibre_g52i38ui \jms_n5uy_pl_arc\OEBPS\content.opf
Parsing all content...
Traceback (most recent call last):
File "runpy.py", line 198, in _run_module_as_main
File "runpy.py", line 88, in _run_code
File "site.py", line 83, in <module>
File "site.py", line 78, in main
File "site.py", line 50, in run_entry_point
File "calibre\utils\ipc\worker.py", line 215, in main
File "calibre\gui2\convert\gui_conversion.py", line 38, in gui_convert_override
File "calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
File "calibre\ebooks\conversion\plumber.py", line 1129, in run
File "calibre\customize\conversion.py", line 245, in __call__
File "calibre\ebooks\conversion\plugins\html_input. py", line 113, in convert
File "calibre\ebooks\conversion\plumber.py", line 1349, in create_oebbook
File "calibre\ebooks\oeb\reader.py", line 97, in __call__
File "calibre\ebooks\oeb\reader.py", line 726, in _all_from_opf
File "calibre\ebooks\oeb\reader.py", line 371, in _spine_from_opf
calibre.ebooks.oeb.base.OEBError: Spine is empty


I guess there's an issue with the .opf file, but I've no idea what might be wrong. Has anyone encountered something like this? Thanks for your suggestions!
Attached Files
File Type: opf content.opf (25.6 KB, 46 views)

Last edited by theducks; 01-28-2025 at 08:42 PM. Reason: quote 2 spoiler
markvdvelde is offline   Reply With Quote
Old 01-28-2025, 10:16 PM   #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: 44,966
Karma: 27109050
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Ditch the OPF file if you want to convert a collection of HTML files follow the instructions in: https://manual.calibre-ebook.com/faq...specific-order
kovidgoyal is offline   Reply With Quote
Advert
Old 01-28-2025, 11:30 PM   #3
markvdvelde
Connoisseur
markvdvelde began at the beginning.
 
Posts: 57
Karma: 12
Join Date: Jan 2011
Device: Kindle
Thanks, I’ll try that. Just wondering if my Kindle will still recognize the .mobi as a dictionary, without the metadata in the opf
markvdvelde is offline   Reply With Quote
Old 01-29-2025, 12:32 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: 44,966
Karma: 27109050
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre doesnt support dictionary conversion anyway so it wont regardless.
kovidgoyal is offline   Reply With Quote
Old 01-29-2025, 06:30 PM   #5
markvdvelde
Connoisseur
markvdvelde began at the beginning.
 
Posts: 57
Karma: 12
Join Date: Jan 2011
Device: Kindle
Quote:
Originally Posted by kovidgoyal View Post
calibre doesnt support dictionary conversion anyway so it wont regardless.
Allright, good to know. Saved me a lot of time

Last edited by markvdvelde; 01-29-2025 at 06:37 PM.
markvdvelde is offline   Reply With Quote
Advert
Reply

Tags
calibre, diccionary, kindle, kindle previewer 3, mobi

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mobi to Epub Conversion of Dictionaries Fails Jaws Conversion 3 02-20-2020 01:47 AM
Conversion to Mobi fails with 1.7 JSWolf Conversion 5 10-20-2013 10:54 PM
Conversion from epub to mobi or azw3 fails Jimbo724 Conversion 3 11-30-2012 02:32 AM
LRF conversion fails (to mobi) styt Conversion 4 04-02-2011 07:18 PM
HTML to Mobi conversion fails gilbert1111 Calibre 5 01-14-2011 10:23 AM


All times are GMT -4. The time now is 03:51 AM.


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