View Single Post
Old 06-11-2013, 06:39 PM   #1
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: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
ePub > AZW3 failed with 0.9.34

I'm converting an ePub into AZW3 and it's failing to do so. I am doing this because I want to add in an embedded font. I used KindleUnpack to build the ePub out of the original AZW3. Then I fixed up the ePub so it validates and has the embedded fonts. Now I go to convert back and it fails as shown below.

Spoiler:
Convert book 1 of 1 (The Silver Star)
Resolved conversion options
calibre version: 0.9.34
{'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(., '\\s*((chapter|book|section|part)\\s+)|((prolog|pr ologue|epilogue)(\\s+|$))', 'i')) or @class = 'chapter']",
'chapter_mark': u'pagebreak',
'comments': None,
'cover': u'C:\\Users\\Kezzie\\AppData\\Local\\Temp\\calibre _f3oeqz\\ef1smc.jpeg',
'debug_pipeline': None,
'dehyphenate': False,
'delete_blank_paragraphs': False,
'disable_font_rescaling': False,
'dont_compress': False,
'duplicate_links_in_toc': False,
'embed_font_family': None,
'enable_heuristics': False,
'extra_css': None,
'extract_to': None,
'filter_css': u'',
'fix_indents': False,
'font_size_mapping': None,
'format_scene_breaks': False,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.SonyReaderInput object at 0x038749B0>,
'insert_blank_line': False,
'insert_blank_line_size': 0.0,
'insert_metadata': False,
'isbn': None,
'italicize_common_cases': False,
'keep_ligatures': False,
'language': None,
'level1_toc': None,
'level2_toc': None,
'level3_toc': None,
'line_height': 0.0,
'linearize_tables': False,
'margin_bottom': -0.1,
'margin_left': -0.1,
'margin_right': -0.1,
'margin_top': -0.1,
'markup_chapter_headings': False,
'max_toc_links': 50,
'minimum_line_height': 100.0,
'mobi_toc_at_start': False,
'no_chapters_in_toc': False,
'no_inline_navbars': False,
'no_inline_toc': False,
'output_profile': <calibre.customize.profiles.TabletOutput object at 0x03874B10>,
'page_breaks_before': u"//*[name()='h1' or name()='h2']",
'prefer_author_sort': False,
'prefer_metadata_cover': False,
'pretty_print': False,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': u'C:\\Users\\Kezzie\\AppData\\Local\\Temp\\calibre _f3oeqz\\b1oti6.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'',
'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,
'unsmarten_punctuation': False,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: EPUB Input running
on C:\Users\Kezzie\AppData\Local\Temp\calibre_f3oeqz\ fhlj19.epub
Parsing all content...
Parsing OEBPS/Text/chapter31.xhtml ...
Parsing OEBPS/Text/ack.xhtml ...
Parsing OEBPS/Text/epigraph.xhtml ...
Parsing OEBPS/Text/chapter47.xhtml ...
Parsing OEBPS/Text/chapter01.xhtml ...
Parsing OEBPS/Text/chapter02.xhtml ...
Parsing OEBPS/Text/chapter42.xhtml ...
Parsing OEBPS/Text/chapter03.xhtml ...
Parsing OEBPS/Text/chapter56.xhtml ...
Parsing OEBPS/Text/chapter04.xhtml ...
Parsing OEBPS/Text/chapter37.xhtml ...
Parsing OEBPS/Text/chapter05.xhtml ...
Parsing OEBPS/Text/chapter55.xhtml ...
Parsing OEBPS/Text/chapter06.xhtml ...
Parsing OEBPS/Text/chapter32.xhtml ...
Parsing OEBPS/Text/chapter07.xhtml ...
Parsing OEBPS/Text/chapter54.xhtml ...
Parsing OEBPS/Text/chapter08.xhtml ...
Parsing OEBPS/Text/about.xhtml ...
Parsing OEBPS/Text/chapter43.xhtml ...
Parsing OEBPS/Text/chapter09.xhtml ...
Parsing OEBPS/Text/chapter53.xhtml ...
Parsing OEBPS/Text/chapter10.xhtml ...
Parsing OEBPS/Text/chapter38.xhtml ...
Parsing OEBPS/Text/chapter36.xhtml ...
Parsing OEBPS/Text/chapter11.xhtml ...
Parsing OEBPS/Text/chapter52.xhtml ...
Parsing OEBPS/Text/chapter12.xhtml ...
Parsing OEBPS/Styles/style0001.css ...
Parsing OEBPS/Text/chapter33.xhtml ...
Parsing OEBPS/Text/chapter13.xhtml ...
Parsing OEBPS/Text/chapter51.xhtml ...
Parsing OEBPS/Text/chapter14.xhtml ...
Parsing OEBPS/Text/chapter44.xhtml ...
Parsing OEBPS/Text/chapter15.xhtml ...
Parsing OEBPS/Text/chapter50.xhtml ...
Parsing OEBPS/Text/chapter46.xhtml ...
Parsing OEBPS/Text/chapter16.xhtml ...
Parsing OEBPS/Text/chapter39.xhtml ...
Parsing OEBPS/Text/chapter17.xhtml ...
Parsing OEBPS/Text/chapter49.xhtml ...
Parsing OEBPS/Text/chapter18.xhtml ...
Parsing OEBPS/Text/chapter34.xhtml ...
Parsing OEBPS/Text/chapter19.xhtml ...
Parsing OEBPS/Text/chapter48.xhtml ...
Parsing OEBPS/Text/chapter20.xhtml ...
Parsing OEBPS/Text/chapter29.xhtml ...
Parsing OEBPS/Text/chapter21.xhtml ...
Parsing OEBPS/Text/chapter22.xhtml ...
Parsing OEBPS/Text/chapter40.xhtml ...
Parsing OEBPS/Text/chapter23.xhtml ...
Parsing OEBPS/Text/chapter24.xhtml ...
Parsing OEBPS/Text/chapter35.xhtml ...
Parsing OEBPS/Text/chapter25.xhtml ...
Parsing OEBPS/Text/chapter45.xhtml ...
Parsing OEBPS/Text/chapter26.xhtml ...
Parsing OEBPS/Text/chapter30.xhtml ...
Parsing OEBPS/Text/chapter27.xhtml ...
Parsing OEBPS/Text/title.xhtml ...
Parsing OEBPS/Text/chapter28.xhtml ...
Parsing OEBPS/Text/chapter41.xhtml ...
Parsing OEBPS/Text/half-title.xhtml ...
Parsing OEBPS/Text/alsoby.xhtml ...
Parsing OEBPS/Text/copyright.xhtml ...
Parsing OEBPS/Text/dedication.xhtml ...
Reading TOC from NCX...
Merging user specified metadata...
Detecting structure...
Flattening CSS and remapping font sizes...
Source base font size is 11.10000pt
Removing fake margins...
Found 1 items of level: div_8
Found 8 items of level: div_1
Found 8 items of level: div_3
Found 8 items of level: div_2
Found 1 items of level: div_5
Found 4 items of level: div_4
Found 1 items of level: div_7
Found 1 items of level: div_6
Found 2 items of level: p_9
Found 16 items of level: p_4
Found 19 items of level: p_5
Found 1916 items of level: p_1
Ignoring level div_8
Ignoring level div_3
Ignoring level div_5
Ignoring level div_4
Ignoring level div_7
Ignoring level div_6
Ignoring level p_9
Ignoring level p_4
Ignoring level p_5
div_1 left margin stats: Counter({u'': 6, u'1.2em': 1})
div_1 right margin stats: Counter({u'': 6, u'1.2em': 1})
div_2 left margin stats: Counter({u'1.2em': 5, u'': 1})
div_2 right margin stats: Counter({u'1.2em': 5, u'': 1})
p_1 left margin stats: Counter({u'0': 1916})
p_1 right margin stats: Counter({u'0': 1916})
Decreased the font OEBPS/Fonts/CharisSILSmCp-R.ttf to 18.6% of its original size
The font OEBPS/Fonts/CharisSILSmCp-BI.ttf is unused. Removing it.
The font OEBPS/Fonts/CharisSILBI.ttf is unused. Removing it.
Decreased the font OEBPS/Fonts/CharisSILB.ttf to 18.5% of its original size
Decreased the font OEBPS/Fonts/CharisSILI.ttf to 18.4% of its original size
The font OEBPS/Fonts/CharisSILSmCp-B.ttf is unused. Removing it.
Decreased the font OEBPS/Fonts/CharisSILR.ttf to 19.0% of its original size
Decreased the font OEBPS/Fonts/CharisSILSmCp-I.ttf to 18.1% of its original size
Reduced total font size to 11.5% of original
Cleaning up manifest...
Trimming unused files from manifest...
Creating AZW3 Output...
Serializing resources...
Splitting markup on page breaks and flow limits, if any...
Creating KF8 output
Generating in-line ToC
Generating KF8 markup...
Compressing markup...
Creating indices...
Python function terminated unexpectedly
Struct() argument 1 must be string, not unicode (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 189, 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 1160, in run
File "site-packages\calibre\ebooks\conversion\plugins\mobi_ou tput.py", line 320, in convert
File "site-packages\calibre\ebooks\mobi\writer8\mobi.py", line 308, in write
File "site-packages\calibre\ebooks\mobi\writer8\mobi.py", line 305, in record0
File "site-packages\calibre\ebooks\mobi\writer8\header.py", line 70, in __call__
TypeError: Struct() argument 1 must be string, not unicode


I also tried 0.9.28 and 0.9.33 and both failed the same way.
JSWolf is offline   Reply With Quote