Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-15-2020, 02:23 AM   #1
Keybounce
Enthusiast
Keybounce began at the beginning.
 
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
Attached Files
File Type: epub Queen Rarity - Damaged.epub (1.13 MB, 132 views)
Keybounce is offline   Reply With Quote
Old 07-15-2020, 03:02 AM   #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: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
This was fixed a long time ago, if you cant update yu will just have to refrain from subsetting/embedding fonts in this book.
kovidgoyal is offline   Reply With Quote
Advert
Old 07-15-2020, 04:20 AM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,408
Karma: 145491800
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Keybounce View Post
I'm using Calibre 3.48, as newer ones require a newer OS on my hardware.
What OS are you running? If it's a MAC, you should dual-boot Windows. If it's a Windows system, upgrade to Windows 10.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversion Failure Mefis Conversion 2 04-18-2015 06:58 PM
Help with conversion failure HowardBrazee Conversion 3 06-18-2013 08:11 AM
How do I fix an illegal character error ITMS-9000 with iBooks Producer? Kratos ePub 4 11-19-2012 06:21 PM
Illegal character in path in ePub file Guido Henkel Calibre 2 05-27-2010 10:10 AM
Conversion Failure edbro Calibre 1 02-27-2010 02:31 PM


All times are GMT -4. The time now is 12:53 AM.


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