I have a catalog (epub) which i want to convert to pdf.
It didn't succeed: error in Python:
Spoiler:
calibre, version 3.41.0 (win32, embedded-python: True)
Conversion error: Mislukt: Boek 1 van 1 (Usenet 2019-W16) converteren
Boek 1 van 1 (Usenet 2019-W16) converteren
Conversion options changed from defaults:
read_metadata_from_opf: u'C:\\Users\\VANDEV~1\\AppData\\Local\\Temp\\calib re_t7okl6\\a4rf7u.opf'
verbose: 2
output_profile: 'kobo'
cover: u'C:\\Users\\VANDEV~1\\AppData\\Local\\Temp\\calib re_t7okl6\\ldw66i.jpeg'
Resolved conversion options
calibre version: 3.41.0
{'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\\VANDEV~1\\AppData\\Local\\Temp\\calib re_t7okl6\\ldw66i.jpeg',
'custom_size': None,
'debug_pipeline': None,
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'duplicate_links_in_toc': False,
'embed_all_fonts': False,
'embed_font_family': None,
'enable_heuristics': False,
'expand_css': False,
'extra_css': None,
'filter_css': u'',
'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 0x06D3AC30>,
'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': 120.0,
'no_chapters_in_toc': False,
'no_inline_navbars': False,
'output_profile': <calibre.customize.profiles.KoboReaderOutput object at 0x06ECC090>,
'page_breaks_before': u'/',
'paper_size': u'letter',
'pdf_add_toc': False,
'pdf_default_font_size': 20,
'pdf_footer_template': None,
'pdf_header_template': None,
'pdf_hyphenate': False,
'pdf_mark_links': False,
'pdf_mono_family': u'Liberation Mono',
'pdf_mono_font_size': 16,
'pdf_page_margin_bottom': 72.0,
'pdf_page_margin_left': 72.0,
'pdf_page_margin_right': 72.0,
'pdf_page_margin_top': 72.0,
'pdf_page_number_map': None,
'pdf_page_numbers': False,
'pdf_sans_family': u'Liberation Sans',
'pdf_serif_family': u'Liberation Serif',
'pdf_standard_font': u'serif',
'pdf_use_document_margins': False,
'prefer_metadata_cover': False,
'preserve_cover_aspect_ratio': False,
'pretty_print': False,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': u'C:\\Users\\VANDEV~1\\AppData\\Local\\Temp\\calib re_t7okl6\\a4rf7u.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,
'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': '[]',
'uncompressed_pdf': False,
'unit': u'inch',
'unsmarten_punctuation': False,
'unwrap_lines': True,
'use_auto_toc': False,
'use_profile_size': False,
'verbose': 2}
InputFormatPlugin: EPUB Input running
on C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\deczbu.epub
Found HTML cover titlepage.xhtml
Parsing all content...
Parsing content/book_55921.html ...
Parsing content/book_55912.html ...
Parsing content/book_55924.html ...
Parsing content/book_55925.html ...
Parsing content/book_55944.html ...
Parsing content/book_55926.html ...
Parsing content/book_55936.html ...
Parsing content/book_55931.html ...
Parsing stylesheet.css ...
Parsing content/book_55933.html ...
Parsing content/book_55932.html ...
Parsing titlepage.xhtml ...
Parsing content/book_55935.html ...
Parsing content/book_55927.html ...
Parsing content/book_55951.html ...
Parsing content/book_55907.html ...
Parsing content/book_55915.html ...
Parsing content/book_55941.html ...
Parsing content/book_55919.html ...
Parsing content/book_55952.html ...
Parsing page_styles.css ...
Parsing content/book_55948.html ...
Parsing content/book_55947.html ...
Parsing content/book_55946.html ...
Parsing content/book_55920.html ...
Parsing content/book_55908.html ...
Parsing content/book_55950.html ...
Parsing content/book_55917.html ...
Parsing content/book_55909.html ...
Parsing content/book_55942.html ...
Parsing content/book_55906.html ...
Parsing content/book_55918.html ...
Parsing content/book_55954.html ...
Parsing content/book_55956.html ...
Parsing content/book_55940.html ...
Parsing content/book_55955.html ...
Parsing content/book_55953.html ...
Reading TOC from NCX...
Merging user specified metadata...
Detecting structure...
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Removing fake margins...
Found 170 items of level: p_1
Found 26 items of level: p_3
Found 17 items of level: p_2
Found 74 items of level: div_4
Found 2 items of level: div_5
Found 26 items of level: div_2
Found 91 items of level: div_3
Found 68 items of level: div_1
Ignoring level p_2
Ignoring level div_5
p_1 left margin stats: Counter({u'0': 170})
p_1 right margin stats: Counter({u'0': 170})
p_3 left margin stats: Counter({u'0': 26})
p_3 right margin stats: Counter({u'0': 26})
div_4 left margin stats: Counter({u'': 74})
div_4 right margin stats: Counter({u'': 74})
div_2 left margin stats: Counter({u'': 15})
div_2 right margin stats: Counter({u'': 15})
div_3 left margin stats: Counter({u'': 91})
div_3 right margin stats: Counter({u'': 91})
div_1 left margin stats: Counter({u'0': 24})
div_1 right margin stats: Counter({u'0': 24})
Cleaning up manifest...
Trimming unused files from manifest...
Trimming u'titlepage.xhtml' from manifest
Creating PDF Output...
Splitting markup on page breaks and flow limits, if any...
Converting input as a text based book...
Serializing oeb input to disk for processing...
The cover image has an id != "cover". Renaming to work around bug in Nook Color
Rendering pages to PDF...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55941.html...
Loading font: family_name=Liberation Serif full_name=Liberation Serif Italic postscript_name=LiberationSerif-Italic subfamily_name=Italic
Loading font: family_name=Liberation Serif full_name=Liberation Serif postscript_name=LiberationSerif subfamily_name=Regular
Loading font: family_name=Liberation Serif full_name=Liberation Serif Bold postscript_name=LiberationSerif-Bold subfamily_name=Bold
Loading font: family_name=Liberation Serif full_name=Liberation Serif Bold Italic postscript_name=LiberationSerif-BoldItalic subfamily_name=Bold Italic
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55919.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55952.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55951.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55948.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55947.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55946.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55920.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55908.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55950.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55917.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55909.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55942.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55918.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55954.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55956.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55940.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55955.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55953.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55921.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55912.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55924.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55925.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55926.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55931.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55933.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55932.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55936.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55944.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55935.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55927.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55906.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55907.html...
Processing C:\Users\VANDEV~1\AppData\Local\Temp\calibre_t7okl 6\92oxa1_pdf_out\content\book_55915.html...
Traceback (most recent call last):
File "site-packages\calibre\ebooks\pdf\render\engine.py", line 157, in end
File "site-packages\calibre\ebooks\pdf\render\serialize.py", line 518, in end
File "site-packages\calibre\ebooks\pdf\render\fonts.py", line 255, in embed_fonts
File "site-packages\calibre\ebooks\pdf\render\fonts.py", line 174, in embed
File "site-packages\calibre\ebooks\pdf\render\fonts.py", line 196, in write_to_unicode
File "site-packages\calibre\ebooks\pdf\render\fonts.py", line 105, in __init__
File "site-packages\calibre\ebooks\pdf\render\fonts.py", line 65, in to_hex_string
TypeError: rjust() argument 2 must be char, not unicode
Python function terminated unexpectedly
PDF Output failed, see log for details (Error Code: 1)
Traceback (most recent call last):
File "site.py", line 101, in main
File "site.py", line 78, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 200, in main
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 42, in gui_convert_override
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 27, in gui_convert
File "site-packages\calibre\ebooks\conversion\plumber.py", line 1271, in run
File "site-packages\calibre\ebooks\conversion\plugins\pdf_out put.py", line 196, in convert
File "site-packages\calibre\ebooks\conversion\plugins\pdf_out put.py", line 282, in convert_text
File "site-packages\calibre\ebooks\conversion\plugins\pdf_out put.py", line 308, in write
File "site-packages\calibre\ebooks\pdf\render\from_html.py", line 255, in dump
Exception: PDF Output failed, see log for details
QWaitCondition: Destroyed while threads are still waiting
Last edited by theducks; 04-22-2019 at 05:03 PM.
Reason: WRAP in spoiler
Until last weeks such conversion worked fine. I mention here this problem becaus I think in the new version of Calibre (op Python) something has changed. Maybe someone can look at it, and solve the problem. I can't (I don't know anything about Python).
For the moment I used a online converter: it worked fine!
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
So just to clarify, updating helped or it didn't? Because if it helped, then there is nothing to look at as we already know why the error happened, fixed it, and released a new version.
This exact error as reported seems to be identical to a known issue in the original buggy 3.41.0 release. If your problem is fixed now, we want to know that. And if your problem is *not* fixed, then we definitely need to know that, so we can actually fix it! Because there were a lot of python changes in the latest version and it had to be rereleased three times. If there are still lingering bugs then we're not done...