convert to pdf failed

Bug #1812218 reported by Dr's Explorer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

calibre, version 3.37.0 (win32, embedded-python: True)
转换错误: 失败: 转换书籍 第 1 本,共 1 本 (Quick Start Guide)

转换书籍 第 1 本,共 1 本 (Quick Start Guide)
C:\Program Files\Calibre2\app\pylib.zip\dateutil\parser.py:601: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
Conversion options changed from defaults:
  verbose: 2
  read_metadata_from_opf: u'C:\\Users\\allan\\AppData\\Local\\Temp\\calibre_ohdqir\\ga6wuw.opf'
  pdf_serif_family: u'\u65b9\u6b63\u5170\u4ead\u5b8b'
  output_profile: 'generic_eink'
  cover: u'C:\\Users\\allan\\AppData\\Local\\Temp\\calibre_ohdqir\\qlxew2.jpeg'
  pdf_sans_family: u'\u65b9\u6b63\u5170\u4ead\u9ed1\u7b80\u4f53'
Resolved conversion options
calibre version: 3.37.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|prologue|epilogue)(\\s+|$))', 'i')) or @class = 'chapter']",
 'chapter_mark': u'pagebreak',
 'comments': None,
 'cover': u'C:\\Users\\allan\\AppData\\Local\\Temp\\calibre_ohdqir\\qlxew2.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 0x000002ACB4BEDF98>,
 '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.GenericEink object at 0x000002ACB7728358>,
 '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'\u65b9\u6b63\u5170\u4ead\u9ed1\u7b80\u4f53',
 'pdf_serif_family': u'\u65b9\u6b63\u5170\u4ead\u5b8b',
 '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\\allan\\AppData\\Local\\Temp\\calibre_ohdqir\\ga6wuw.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\allan\AppData\Local\Temp\calibre_ohdqir\pdr7l4.epub
Found HTML cover text/titlepage.xhtml
Parsing all content...
Parsing text/installing_calibre.xhtml ...
Parsing text/common_tasks.xhtml ...
Parsing text/where_to_get_help.xhtml ...
Parsing text/internal_titlepage.xhtml ...
Parsing text/task_4_downloading_news.xhtml ...
Parsing text/the_main_gui_window.xhtml ...
Parsing text/task_6_the_ebook_viewer.xhtml ...
Parsing text/task_3_the_ebook_editor.xhtml ...
Parsing text/introduction.xhtml ...
Parsing text/titlepage.xhtml ...
Parsing text/toc.xhtml ...
Parsing text/task_1_organizing.xhtml ...
Parsing styles/stylesheet.css ...
Parsing text/task_2_conversion.xhtml ...
Parsing text/task_5_interacting_with_ebook_readers.xhtml ...
Reading TOC from NCX...
Merging user specified metadata...
Detecting structure...
 Detected chapter: Task 3: The e-book editor
 Detected chapter: Task 5: Interacting with e-book readers
 Detected chapter: Task 6: The e-book viewer
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Removing fake margins...
Found 63 items of level: p_1
p_1 left margin stats: Counter({u'0': 63})
p_1 right margin stats: Counter({u'0': 63})
Cleaning up manifest...
Trimming unused files from manifest...
Trimming u'text/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\allan\AppData\Local\Temp\calibre_ohdqir\4gukeq_pdf_out\text\internal_titlepage.xhtml...
Loading font: family_name=方正兰亭宋 full_name=方正兰亭宋 postscript_name=方正兰亭宋 subfamily_name=方正兰亭宋
Processing C:\Users\allan\AppData\Local\Temp\calibre_ohdqir\4gukeq_pdf_out\text\toc.xhtml...
Processing C:\Users\allan\AppData\Local\Temp\calibre_ohdqir\4gukeq_pdf_out\text\introduction.xhtml...
Processing C:\Users\allan\AppData\Local\Temp\calibre_ohdqir\4gukeq_pdf_out\text\installing_calibre.xhtml...
Processing C:\Users\allan\AppData\Local\Temp\calibre_ohdqir\4gukeq_pdf_out\text\the_main_gui_window.xhtml...
Processing C:\Users\allan\AppData\Local\Temp\calibre_ohdqir\4gukeq_pdf_out\text\common_tasks.xhtml...
Processing C:\Users\allan\AppData\Local\Temp\calibre_ohdqir\4gukeq_pdf_out\text\task_1_organizing.xhtml...
Processing C:\Users\allan\AppData\Local\Temp\calibre_ohdqir\4gukeq_pdf_out\text\task_2_conversion.xhtml...
Processing C:\Users\allan\AppData\Local\Temp\calibre_ohdqir\4gukeq_pdf_out\text\task_3_the_ebook_editor.xhtml...
Processing C:\Users\allan\AppData\Local\Temp\calibre_ohdqir\4gukeq_pdf_out\text\task_4_downloading_news.xhtml...
Processing C:\Users\allan\AppData\Local\Temp\calibre_ohdqir\4gukeq_pdf_out\text\task_5_interacting_with_ebook_readers.xhtml...
Processing C:\Users\allan\AppData\Local\Temp\calibre_ohdqir\4gukeq_pdf_out\text\task_6_the_ebook_viewer.xhtml...
Processing C:\Users\allan\AppData\Local\Temp\calibre_ohdqir\4gukeq_pdf_out\text\where_to_get_help.xhtml...
Traceback (most recent call last):
  File "site-packages\calibre\ebooks\pdf\render\engine.py", line 156, in end
  File "site-packages\calibre\ebooks\pdf\render\serialize.py", line 517, in end
  File "site-packages\calibre\ebooks\pdf\render\fonts.py", line 248, in embed_fonts
  File "site-packages\calibre\ebooks\pdf\render\fonts.py", line 166, in embed
  File "site-packages\calibre\ebooks\pdf\render\fonts.py", line 189, in write_to_unicode
  File "site-packages\calibre\ebooks\pdf\render\fonts.py", line 111, in __init__
  File "site-packages\calibre\ebooks\pdf\render\common.py", line 220, in write
UnicodeEncodeError: 'ascii' codec can't encode characters in position 71-75: ordinal not in range(128)

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 199, 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 1270, in run
  File "site-packages\calibre\ebooks\conversion\plugins\pdf_output.py", line 195, in convert
  File "site-packages\calibre\ebooks\conversion\plugins\pdf_output.py", line 281, in convert_text
  File "site-packages\calibre\ebooks\conversion\plugins\pdf_output.py", line 307, in write
  File "site-packages\calibre\ebooks\pdf\render\from_html.py", line 254, in dump
Exception: PDF Output failed, see log for details

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.