Comment 0 for bug 1995551

Revision history for this message
polyproline (polyproline) wrote : [Bug] TypeError: cannot convert 'NoneType' object to bytes

ebook-convert.exe .\testNone.original_epub .epub --subset-embedded-fonts --insert-blank-line --remove-paragraph-spacing --linearize-tables --duplicate-links-in-toc --enable-heuristics --preserve-cover-aspect-ratio --epub-version 3
Conversion options changed from defaults:
  subset_embedded_fonts: True
  linearize_tables: True
  enable_heuristics: True
  remove_paragraph_spacing: True
  preserve_cover_aspect_ratio: True
  duplicate_links_in_toc: True
  insert_blank_line: True
  epub_version: '3'
1% 将输入转换为HTML中...
InputFormatPlugin: EPUB Input running
on D:\Document\test\testNone.original_epub
Parsing all content...
flow is too short, not running heuristics
flow is too short, not running heuristics
flow is too short, not running heuristics
34% 正在对电子书进行转换...
Merging user specified metadata...
Detecting structure...
        Detected chapter: Chapter 1. The Tar Pit
        .....
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Removing fake margins...
Cleaning up manifest...
Trimming unused files from manifest...
Trimming 'OEBPS/html/graphics/19161.jpg' from manifest
Creating EPUB Output...
67% 正在运行 EPUB Output 插件
Rescaling image from 1000x1572 to 754x1186 OEBPS/html/graphics/f15fig04.gif
Splitting markup on page breaks and flow limits, if any...
        Looking for large trees in OEBPS/html/cover.html...
        No large trees found
        .........
The cover image has an id != "cover". Renaming to work around bug in Nook Color
Traceback (most recent call last):
  File "runpy.py", line 196, in _run_module_as_main
  File "runpy.py", line 86, in _run_code
  File "site.py", line 82, in <module>
  File "site.py", line 77, in main
  File "site.py", line 49, in run_entry_point
  File "calibre\ebooks\conversion\cli.py", line 419, in main
  File "calibre\ebooks\conversion\plumber.py", line 1281, in run
  File "calibre\ebooks\conversion\plugins\epub_output.py", line 256, in convert
  File "calibre\ebooks\conversion\plugins\oeb_output.py", line 68, in convert
  File "calibre\ebooks\oeb\base.py", line 1099, in bytes_representation
  File "calibre\ebooks\oeb\base.py", line 435, in serialize
TypeError: cannot convert 'NoneType' object to bytes