View Single Post
Old 10-12-2020, 07:55 AM   #428
fuzzer
Junior Member
fuzzer began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Oct 2020
Device: Kobo Clara HD, Kindle, Kindle Touch, Kindle Paperwhite
ObfuscationKeyMissing Error with latest KePub Output 3.4.1

Hi,

first of all, thanks for all your effort for making these great plugins.

With the latest KePub Output plugin, I have issues converting several ePubs which seem to have obfuscated fonts. When downgrading to 3.2.15 it works just fine. I am using the latest Calibre version (5.2), installed via the official installer script on Arch Linux.

I attached the error output below. Some of the last lines (regarding encrypting font) could not be pasted, therefore I omitted them and proceeded with the Python trace.

Please let me know if you need more information to pinpoint the issue. Thank you very much and have a nice week.

Code:
Convert book 1 of 1 (My Book)
Conversion options changed from defaults:
  page_breaks_before: "//*[name()='h1' or name()='h2']"
  output_profile: 'kobo'
  verbose: 2
  read_metadata_from_opf: '/tmp/calibre_5.2.0_tmp_oe2n2b5q/7o1kn157.opf'
  cover: '/tmp/calibre_5.2.0_tmp_oe2n2b5q/iop2pwx4.jpeg'
Resolved conversion options
calibre version: 5.2.0
{'asciiize': False,
 'author_sort': None,
 'authors': None,
 'base_font_size': 0.0,
 'book_producer': None,
 'change_justification': 'original',
 'chapter': "//*[((name()='h1' or name()='h2') and re:test(., "
            "'\\s*((chapter|book|section|part)\\s+)|((prolog|prologue|epilogue)(\\s+|$))', "
            "'i')) or @class = 'chapter']",
 'chapter_mark': 'pagebreak',
 'comments': None,
 'cover': '/tmp/calibre_5.2.0_tmp_oe2n2b5q/iop2pwx4.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,
 'embed_all_fonts': False,
 'embed_font_family': None,
 'enable_heuristics': False,
 'epub_flatten': False,
 'epub_inline_toc': False,
 'epub_toc_at_end': False,
 'epub_version': '3',
 'expand_css': False,
 'extra_css': None,
 'extract_to': None,
 'filter_css': '',
 '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 0x7fd1d1eb15b0>,
 'insert_blank_line': False,
 'insert_blank_line_size': 0.5,
 'insert_metadata': False,
 'isbn': None,
 'italicize_common_cases': True,
 'keep_ligatures': False,
 'kepub_clean_markup': True,
 'kepub_disable_hyphenation': False,
 'kepub_hyphenate': True,
 'kepub_hyphenate_chars': 6,
 'kepub_hyphenate_chars_after': 3,
 'kepub_hyphenate_chars_before': 3,
 'kepub_hyphenate_limit_lines': 2,
 '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.KoboReaderOutput object at 0x7fd1d1eb1bb0>,
 'page_breaks_before': "//*[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': '/tmp/calibre_5.2.0_tmp_oe2n2b5q/7o1kn157.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,
 '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': '[]',
 'unsmarten_punctuation': False,
 'unwrap_lines': True,
 'use_auto_toc': False,
 'verbose': 2}
InputFormatPlugin: EPUB Input running
on /tmp/calibre_5.2.0_tmp_oe2n2b5q/961ml08w.epub
Found HTML cover titlepage.xhtml
Parsing all content...
Parsing text/part0037.html ...
Parsing text/part0015.html ...
Parsing text/part0001.html ...
Parsing text/part0005.html ...
Parsing text/part0009.html ...
Parsing text/part0019.html ...
Parsing text/part0023.html ...
Parsing text/part0027.html ...
Parsing text/part0031.html ...
Parsing text/part0035.html ...
Parsing text/part0039.html ...
Parsing text/part0038.html ...
Parsing stylesheet.css ...
Parsing text/part0014.html ...
Parsing text/part0000.html ...
Parsing text/part0004.html ...
Parsing text/part0008.html ...
Parsing text/part0012.html ...
Parsing text/part0018.html ...
Parsing text/part0022.html ...
Parsing text/part0026.html ...
Parsing text/part0030.html ...
Parsing text/part0034.html ...
Parsing page_styles.css ...
Parsing text/part0013.html ...
Parsing titlepage.xhtml ...
Parsing text/part0003.html ...
Parsing text/part0007.html ...
Parsing text/part0011.html ...
Parsing text/part0017.html ...
Parsing text/part0021.html ...
Parsing text/part0025.html ...
Parsing text/part0029.html ...
Parsing text/part0033.html ...
Parsing page_styles1.css ...
Parsing text/part0010.html ...
Parsing text/part0002.html ...
Parsing text/part0006.html ...
Parsing text/part0016.html ...
Parsing text/part0020.html ...
Parsing text/part0024.html ...
Parsing text/part0028.html ...
Parsing text/part0032.html ...
Parsing text/part0036.html ...
Parsing text/part0040.html ...
Referenced file 'styles/XXXXXXXXXXXXXXXX' not found
Reading TOC from NCX...
Merging user specified metadata...
Detecting structure...
	Detected chapter: Prolog
Flattening CSS and remapping font sizes...
Source base font size is 10.80000pt
Removing fake margins...
Found 887 items of level: p_1
Found 80 items of level: div_1
Found 218 items of level: p_2
p_1  left margin stats: Counter({'0': 887})
p_1  right margin stats: Counter({'1em': 864, '0': 23})
Removing level p_1 right margin of: 1em
div_1  left margin stats: Counter({'1.25em': 7})
div_1  right margin stats: Counter({'1em': 7})
Removing level div_1 left margin of: 1.25em
Removing level div_1 right margin of: 1em
p_2  left margin stats: Counter({'0': 218})
p_2  right margin stats: Counter({'1em': 217, '0': 1})
Removing level p_2 right margin of: 1em
Cleaning up manifest...
Trimming unused files from manifest...
Trimming 'titlepage.xhtml' from manifest
Creating KePub Output...
2020-10-12 13:43:01 [DEBUG] Running ePub conversion
Rescaling image from 1347x2200 to 420x686 cover1.jpeg
Splitting markup on page breaks and flow limits, if any...
		Splitting on page-break at id=hid30
Adjusted split point to ancestor
	Looking for large trees in text/part0037.html...
	No large trees found
		Splitting on page-break at id=hid10
Adjusted split point to ancestor
	Looking for large trees in text/part0015.html...
	No large trees found
		Splitting on page-break at id=UGI1-d6187b217ac24c5eba000ef7ea43ba1f
	Looking for large trees in text/part0001.html...
	No large trees found
		Splitting on page-break at id=calibre_pb_0
	Looking for large trees in text/part0005.html...
	No large trees found
		Splitting on page-break at id=hid4
Adjusted split point to ancestor
	Looking for large trees in text/part0009.html...
	No large trees found
		Splitting on page-break at id=hid14
Adjusted split point to ancestor
	Looking for large trees in text/part0019.html...
	No large trees found
		Splitting on page-break at id=hid17
Adjusted split point to ancestor
	Looking for large trees in text/part0023.html...
	No large trees found
		Splitting on page-break at id=hid21
Adjusted split point to ancestor
	Looking for large trees in text/part0027.html...
	No large trees found
		Splitting on page-break at id=hid25
Adjusted split point to ancestor
	Looking for large trees in text/part0031.html...
	No large trees found
		Splitting on page-break at id=hid28
Adjusted split point to ancestor
	Looking for large trees in text/part0035.html...
	No large trees found
		Splitting on page-break at id=calibre_pb_0
	Looking for large trees in text/part0039.html...
	No large trees found
		Splitting on page-break at id=calibre_pb_0
	Looking for large trees in text/part0038.html...
	No large trees found
		Splitting on page-break at id=hid9
Adjusted split point to ancestor
	Looking for large trees in text/part0014.html...
	No large trees found
	Looking for large trees in text/part0000.html...
	No large trees found
	Looking for large trees in text/part0004.html...
	No large trees found
		Splitting on page-break at id=hid3
Adjusted split point to ancestor
	Looking for large trees in text/part0008.html...
	No large trees found
		Splitting on page-break at id=hid7
Adjusted split point to ancestor
	Looking for large trees in text/part0012.html...
	No large trees found
		Splitting on page-break at id=hid13
Adjusted split point to ancestor
	Looking for large trees in text/part0018.html...
	No large trees found
		Splitting on page-break at id=hid16
Adjusted split point to ancestor
	Looking for large trees in text/part0022.html...
	No large trees found
		Splitting on page-break at id=hid20
Adjusted split point to ancestor
	Looking for large trees in text/part0026.html...
	No large trees found
		Splitting on page-break at id=hid24
Adjusted split point to ancestor
	Looking for large trees in text/part0030.html...
	No large trees found
		Splitting on page-break at id=calibre_pb_0
	Looking for large trees in text/part0034.html...
	No large trees found
		Splitting on page-break at id=hid8
Adjusted split point to ancestor
	Looking for large trees in text/part0013.html...
	No large trees found
	Looking for large trees in text/part0003.html...
	No large trees found
		Splitting on page-break at id=hid2
Adjusted split point to ancestor
	Looking for large trees in text/part0007.html...
	No large trees found
		Splitting on page-break at id=hid6
Adjusted split point to ancestor
	Looking for large trees in text/part0011.html...
	No large trees found
		Splitting on page-break at id=hid12
Adjusted split point to ancestor
	Looking for large trees in text/part0017.html...
	No large trees found
		Splitting on page-break at id=hid15
Adjusted split point to ancestor
	Looking for large trees in text/part0021.html...
	No large trees found
		Splitting on page-break at id=hid19
Adjusted split point to ancestor
	Looking for large trees in text/part0025.html...
	No large trees found
		Splitting on page-break at id=hid23
Adjusted split point to ancestor
	Looking for large trees in text/part0029.html...
	No large trees found
		Splitting on page-break at id=hid27
Adjusted split point to ancestor
	Looking for large trees in text/part0033.html...
	No large trees found
		Splitting on page-break at id=hid5
Adjusted split point to ancestor
	Looking for large trees in text/part0010.html...
	No large trees found
	Looking for large trees in text/part0002.html...
	No large trees found
		Splitting on page-break at id=hid1
Adjusted split point to ancestor
	Looking for large trees in text/part0006.html...
	No large trees found
		Splitting on page-break at id=hid11
Adjusted split point to ancestor
	Looking for large trees in text/part0016.html...
	No large trees found
		Splitting on page-break at id=calibre_pb_0
	Looking for large trees in text/part0020.html...
	No large trees found
		Splitting on page-break at id=hid18
Adjusted split point to ancestor
	Looking for large trees in text/part0024.html...
	No large trees found
		Splitting on page-break at id=hid22
Adjusted split point to ancestor
	Looking for large trees in text/part0028.html...
	No large trees found
		Splitting on page-break at id=hid26
Adjusted split point to ancestor
	Looking for large trees in text/part0032.html...
	No large trees found
		Splitting on page-break at id=hid29
Adjusted split point to ancestor
	Looking for large trees in text/part0036.html...
	No large trees found
		Splitting on page-break at id=calibre_pb_0
	Looking for large trees in text/part0040.html...
	No large trees found
2020-10-12 13:43:01 [WARN] The cover image has an id != "cover". Renaming to work around bug in Nook Color
2020-10-12 13:43:01 [INFO] Upgrading to EPUB 3...
2020-10-12 13:43:01 [DEBUG] Encrypting font:

..snip.. can't paste repeating encrypting font output here..

2020-10-12 13:43:01 [DEBUG] Done ePub conversion
Traceback (most recent call last):
  File "runpy.py", line 194, in _run_module_as_main
  File "runpy.py", line 87, in _run_code
  File "site.py", line 45, in <module>
  File "site.py", line 41, in main
  File "calibre/utils/ipc/worker.py", line 215, in main
  File "calibre/gui2/convert/gui_conversion.py", line 41, in gui_convert_override
  File "calibre/gui2/convert/gui_conversion.py", line 28, in gui_convert
  File "calibre/ebooks/conversion/plumber.py", line 1274, in run
  File "calibre_plugins.kepubout.conversion.kepub_output", line 145, in convert
  File "calibre_plugins.kepubout.container", line 130, in __init__
  File "calibre/ebooks/oeb/polish/container.py", line 1223, in __init__
  File "calibre/ebooks/oeb/polish/container.py", line 1340, in process_encryption
calibre.ebooks.oeb.polish.container.ObfuscationKeyMissing: Failed to find obfuscation key
fuzzer is offline   Reply With Quote