Can't Convert Gutenberg AZW3 to DOCX

Bug #1619662 reported by Dave on 2016-09-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

Operating system: Windows 10
calibre, version 2.66.0 (win32, embedded-python: True)
Conversion Error: Failed: Convert book 1 of 1 (Petroleum)

Convert book 1 of 1 (Petroleum)
Resolved conversion options
calibre version: 2.66.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\\Dani\\AppData\\Local\\Temp\\calibre_inm2yh\\xjuqdb.jpeg',
 'debug_pipeline': None,
 'dehyphenate': True,
 'delete_blank_paragraphs': True,
 'disable_font_rescaling': False,
 'docx_custom_page_size': None,
 'docx_no_cover': False,
 'docx_no_toc': False,
 'docx_page_size': u'letter',
 'duplicate_links_in_toc': False,
 'embed_all_fonts': False,
 'embed_font_family': None,
 'enable_heuristics': False,
 'expand_css': False,
 'extra_css': None,
 'extract_to': 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 0x00000000024E2E48>,
 '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': 72.0,
 'margin_left': 72.0,
 'margin_right': 72.0,
 'margin_top': 72.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 0x000000000252D208>,
 'page_breaks_before': u"//*[name()='h1' or name()='h2']",
 'prefer_metadata_cover': False,
 'pretty_print': False,
 'pubdate': None,
 'publisher': None,
 'rating': None,
 'read_metadata_from_opf': u'C:\\Users\\Dani\\AppData\\Local\\Temp\\calibre_inm2yh\\x30it5.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,
 'transform_css_rules': '[]',
 'unsmarten_punctuation': False,
 'unwrap_lines': True,
 'use_auto_toc': False,
 'verbose': 2}
InputFormatPlugin: MOBI Input running
on C:\Users\Dani\AppData\Local\Temp\calibre_inm2yh\2oz1yc.azw3
Found KF8 MOBI of type 'standalone'
Extracting text...
Parsing all content...
Parsing text/part0016.html ...
Parsing text/part0022.html ...
Parsing text/part0004.html ...
Parsing text/part0017.html ...
Parsing text/part0013.html ...
Parsing text/part0010.html ...
Parsing text/part0005.html ...
Parsing text/part0018.html ...
Parsing text/part0019.html ...
Parsing text/part0006.html ...
Parsing text/part0008.html ...
Parsing text/part0012.html ...
Parsing styles/0001.css ...
Parsing text/part0007.html ...
Parsing styles/0002.css ...
Parsing text/part0020.html ...
Parsing text/part0001.html ...
Parsing text/part0023.html ...
Parsing text/part0000.html ...
Parsing text/part0014.html ...
Parsing text/part0011.html ...
Parsing text/part0009.html ...
Parsing text/part0002.html ...
Parsing text/part0021.html ...
Parsing text/part0015.html ...
Parsing text/part0003.html ...
Parsing text/part0024.html ...
Referenced file u'text/%40public%40vhost%40g%40gutenberg%40html%40files%4052825%4052825-h%40images%40cover.jpg' not found
Reading TOC from NCX...
Merging user specified metadata...
Detecting structure...
 Detected chapter: CHAPTER I PETROLEUM AND ITS ORIGIN
 Detected chapter: CHAPTER II THE OIL-FIELDS OF THE WORLD
 Detected chapter: CHAPTER III HOW PETROLEUM IS PRODUCED
 Detected chapter: CHAPTER IV THE REFINING OF PETROLEUM
 Detected chapter: CHAPTER V TRANSPORT BY LAND AND SEA
 Detected chapter: CHAPTER VI PETROLEUM AS FUEL
 Detected chapter: CHAPTER VII PETROLEUM AS A LIGHTING AND COOKING AG
 Detected chapter: CHAPTER VIII INTERNAL COMBUSTION ENGINES
 Detected chapter: CHAPTER IX PETROLEUM IN ENGLAND
 Detected chapter: CHAPTER X PETROLEUM IN THE BRITISH EMPIRE
 Detected chapter: CHAPTER XI PETROLEUM’S PART IN THE GREAT WAR
 Detected chapter: CHAPTER XII THE SCOTTISH SHALE-OIL INDUSTRY
 Detected chapter: CHAPTER XIII A FEW NOTABLE PETROLEUM ENTERPRISES
 Detected chapter: CHAPTER XIV STATISTICAL
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Removing fake margins...
Found 323 items of level: p_1
Found 10 items of level: p_4
Found 63 items of level: p_2
Found 8 items of level: p_3
Found 4 items of level: div_3
Found 3 items of level: div_2
Found 56 items of level: div_1
Ignoring level p_4
Ignoring level p_3
Ignoring level div_3
p_1 left margin stats: Counter({u'0': 320, u'auto': 2, u'5%': 1})
p_1 right margin stats: Counter({u'0': 320, u'auto': 2, u'5%': 1})
Negative text indent detected at level p_2, ignoring this level
div_2 left margin stats: Counter({u'0': 1})
div_2 right margin stats: Counter({u'0': 1})
div_1 left margin stats: Counter({u'': 5})
div_1 right margin stats: Counter({u'': 5})
Cleaning up manifest...
Trimming unused files from manifest...
Trimming u'images/00035.jpeg' from manifest
Creating DOCX Output...
Rasterizing SVG images...
Processing text/part0000.html
Python function terminated unexpectedly
  'NoneType' object has no attribute 'add_table' (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 190, 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 1222, in run
  File "site-packages\calibre\ebooks\conversion\plugins\docx_output.py", line 65, in convert
  File "site-packages\calibre\ebooks\docx\writer\from_html.py", line 416, in __call__
  File "site-packages\calibre\ebooks\docx\writer\from_html.py", line 458, in process_item
  File "site-packages\calibre\ebooks\docx\writer\from_html.py", line 509, in process_tag
  File "site-packages\calibre\ebooks\docx\writer\from_html.py", line 509, in process_tag
  File "site-packages\calibre\ebooks\docx\writer\from_html.py", line 509, in process_tag
  File "site-packages\calibre\ebooks\docx\writer\from_html.py", line 512, in process_tag
  File "site-packages\calibre\ebooks\docx\writer\from_html.py", line 312, in finish_tag
  File "site-packages\calibre\ebooks\docx\writer\tables.py", line 327, in add_table
AttributeError: 'NoneType' object has no attribute 'add_table'

Dave (davedanikinsella) wrote :

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

 status fixreleased

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

Other bug subscribers