Enthusiast
Posts: 44
Karma: 10
Join Date: Aug 2019
Device: kindle (various)
|
Illegal character conversion failure
I'm having a conversion fail with
Python function terminated unexpectedly: U_INVALID_CHAR_FOUND
This is running on python 2.7. I know that the input book has unicode characters in it (french accented letters).
I'm using Calibre 3.48, as newer ones require a newer OS on my hardware.
EDIT: If I do not embed fonts, it seems to convert just fine.
Error log:
Code:
Convert book 1 of 1 (Queen Rarity)
Conversion options changed from defaults:
base_font_size: 28.0
remove_paragraph_spacing: True
dont_compress: True
minimum_line_height: 105.0
font_size_mapping: u'10, 20.0, 27.0, 28.0, 28.4, 29.0, 30.0, 31.0'
embed_font_family: u'Comic Sans MS'
read_metadata_from_opf: u'/var/folders/d0/7h02ky8902xf4866mr_xvkq00000gp/C/calibre_3.48.0_tmp__Cbi2e/0qfApv.opf'
embed_all_fonts: True
verbose: 2
cover: u'/var/folders/d0/7h02ky8902xf4866mr_xvkq00000gp/C/calibre_3.48.0_tmp__Cbi2e/84xLT3.jpeg'
output_profile: u'kindle_pw'
subset_embedded_fonts: True
change_justification: u'left'
unsmarten_punctuation: True
Resolved conversion options
calibre version: 3.48.0
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 28.0,
'book_producer': None,
'change_justification': u'left',
'chapter': u"//*[((name()='h1' or name()='h2') and re:test(., '\\s*((chapter|book|section|part)\\s+)|((prolog|prologue|epilogue)(\\s+|$))', 'i')) or @class = 'chapter']",
'chapter_mark': u'pagebreak',
'comments': None,
'cover': u'/var/folders/d0/7h02ky8902xf4866mr_xvkq00000gp/C/calibre_3.48.0_tmp__Cbi2e/84xLT3.jpeg',
'debug_pipeline': None,
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'dont_compress': True,
'duplicate_links_in_toc': False,
'embed_all_fonts': True,
'embed_font_family': u'Comic Sans MS',
'enable_heuristics': False,
'expand_css': False,
'extra_css': None,
'extract_to': None,
'filter_css': u'',
'fix_indents': True,
'font_size_mapping': u'10, 20.0, 27.0, 28.0, 28.4, 29.0, 30.0, 31.0',
'format_scene_breaks': True,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x10e188d10>,
'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': 105.0,
'mobi_file_type': u'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': False,
'output_profile': <calibre.customize.profiles.KindlePaperWhiteOutput object at 0x10e192510>,
'page_breaks_before': u'/',
'personal_doc': u'[PDOC]',
'prefer_author_sort': False,
'prefer_metadata_cover': False,
'pretty_print': False,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': u'/var/folders/d0/7h02ky8902xf4866mr_xvkq00000gp/C/calibre_3.48.0_tmp__Cbi2e/0qfApv.opf',
'remove_fake_margins': True,
'remove_first_image': False,
'remove_paragraph_spacing': True,
'remove_paragraph_spacing_indent_size': 1.5,
'renumber_headings': True,
'replace_scene_breaks': u'',
'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': True,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'toc_title': None,
'transform_css_rules': '[]',
'unsmarten_punctuation': True,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: EPUB Input running
on /var/folders/d0/7h02ky8902xf4866mr_xvkq00000gp/C/calibre_3.48.0_tmp__Cbi2e/P3Fbjm.epub
Found HTML cover OEBPS/cover.xhtml
Parsing all content...
Parsing OEBPS/file0028.xhtml ...
Parsing OEBPS/file0014.xhtml ...
Parsing OEBPS/stylesheet.css ...
Parsing OEBPS/file0016.xhtml ...
Parsing OEBPS/cover.xhtml ...
Parsing OEBPS/file0017.xhtml ...
Parsing OEBPS/file0018.xhtml ...
Parsing OEBPS/file0001.xhtml ...
Parsing OEBPS/file0025.xhtml ...
Parsing OEBPS/file0019.xhtml ...
Parsing OEBPS/file0015.xhtml ...
Parsing OEBPS/file0002.xhtml ...
Parsing OEBPS/file0020.xhtml ...
Parsing OEBPS/file0003.xhtml ...
Parsing OEBPS/file0021.xhtml ...
Parsing OEBPS/file0004.xhtml ...
Parsing OEBPS/file0022.xhtml ...
Parsing OEBPS/file0026.xhtml ...
Parsing OEBPS/file0005.xhtml ...
Parsing OEBPS/file0023.xhtml ...
Parsing OEBPS/file0013.xhtml ...
Parsing OEBPS/file0024.xhtml ...
Parsing OEBPS/file0006.xhtml ...
Parsing OEBPS/file0011.xhtml ...
Parsing OEBPS/file0008.xhtml ...
Parsing OEBPS/file0009.xhtml ...
Parsing OEBPS/file0010.xhtml ...
Parsing OEBPS/title_page.xhtml ...
Parsing OEBPS/file0012.xhtml ...
Parsing OEBPS/file0027.xhtml ...
Parsing OEBPS/file0007.xhtml ...
Referenced file u'/tag/alternate-universe' not found
Referenced file u'/story/108781/gears-in-the-void' not found
Referenced file u'/tag/comedy' not found
Referenced file u'/tag/adventure' not found
Referenced file u'/user/106987/Lab' not found
Referenced file u'/tag/mlp-fim' not found
Referenced file u'/tag/human' not found
Referenced file u'/blog/838666/emoji-emoji' not found
Referenced file u'/tag/original-character' not found
Reading TOC from NCX...
Merging user specified metadata...
Detecting structure...
Flattening CSS and remapping font sizes...
Embedding font: Comic Sans MS
Property: Unknown Property name. [1:14: panose-1]
Property: Unknown Property name. [1:32: panose-1]
Source base font size is 12.00000pt
Removing fake margins...
Found 1 items of level: div_8
Found 1 items of level: div_9
Found 159 items of level: div_4
Found 1 items of level: div_5
Found 2 items of level: div_6
Found 2 items of level: div_7
Found 57 items of level: div_1
Found 30 items of level: div_2
Found 173 items of level: div_3
Found 153 items of level: p_5
Found 34 items of level: p_4
Found 15681 items of level: p_3
Found 250 items of level: p_2
Ignoring level div_5
Ignoring level div_6
Ignoring level div_7
Ignoring level div_8
Ignoring level div_9
div_4 left margin stats: Counter({u'': 159})
div_4 right margin stats: Counter({u'': 159})
div_1 left margin stats: Counter({u'': 57})
div_1 right margin stats: Counter({u'': 57})
div_2 left margin stats: Counter({u'': 29})
div_2 right margin stats: Counter({u'': 29})
div_3 left margin stats: Counter({u'': 173})
div_3 right margin stats: Counter({u'': 173})
p_5 left margin stats: Counter({u'0': 153})
p_5 right margin stats: Counter({u'0': 153})
p_4 left margin stats: Counter({u'0': 34})
p_4 right margin stats: Counter({u'0': 34})
p_3 left margin stats: Counter({u'0': 15681})
p_3 right margin stats: Counter({u'0': 15681})
p_2 left margin stats: Counter({u'0': 250})
p_2 right margin stats: Counter({u'0': 250})
Embedding font Comic Sans MS from /Users/michael/Library/Preferences/calibre/fonts/Comic Sans MS.ttf
Python function terminated unexpectedly: U_INVALID_CHAR_FOUND
Traceback (most recent call last):
File "/Volumes/calibre-3.48.0/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 154, in main
return run_entry_point()
File "/Volumes/calibre-3.48.0/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 114, in run_entry_point
return getattr(pmod, func)()
File "site-packages/calibre/utils/ipc/worker.py", line 199, in main
File "site-packages/calibre/gui2/convert/gui_conversion.py", line 43, in gui_convert_override
File "site-packages/calibre/gui2/convert/gui_conversion.py", line 28, in gui_convert
File "site-packages/calibre/ebooks/conversion/plumber.py", line 1249, in run
File "site-packages/calibre/ebooks/oeb/transforms/subset.py", line 160, in __call__
File "site-packages/calibre/utils/fonts/sfnt/subset.py", line 115, in subset
File "site-packages/calibre/utils/fonts/sfnt/subset.py", line 109, in safe_ord
ValueError: U_INVALID_CHAR_FOUND
|