View Single Post
Old 05-26-2018, 01:03 PM   #1
Superbra
Junior Member
Superbra began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2018
Device: Kobo Aura One
Python error when converting epub to epub

I'm trying to convert all of my epubs to epub to solve some errors in the epubs. When I launch the conversion, It just fails. The log file says it is a Python problem and I reported it as a bug. I'm posting this in the hope that someone encountered the same error and found a solution or workaround for it... Below you can find the complete log for one epub:

---------------------------
Spoiler:

Convert book 1 of 1 (Planeten Te Koop)
Conversion options changed from defaults:
linearize_tables: True
epub_version: u'3'
smarten_punctuation: True
remove_paragraph_spacing: True
epub_inline_toc: True
page_breaks_before: u"//*[name()='h1' or name()='h2']"
output_profile: 'kobo'
cover: u'C:\\Users\\bart\\AppData\\Local\\Temp\\calibre_i si1no\\1itt4u.jpeg'
subset_embedded_fonts: True
verbose: 2
read_metadata_from_opf: u'C:\\Users\\bart\\AppData\\Local\\Temp\\calibre_i si1no\\dsetxb.opf'
Resolved conversion options
calibre version: 3.24.1
{'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\\bart\\AppData\\Local\\Temp\\calibre_i si1no\\1itt4u.jpeg',
'debug_pipeline': None,
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'dont_split_on_page_breaks': False,
'duplicate_links_in_toc': False,
'embed_all_fonts': False,
'embed_font_family': None,
'enable_heuristics': False,
'epub_flatten': False,
'epub_inline_toc': True,
'epub_toc_at_end': False,
'epub_version': u'3',
'expand_css': False,
'extra_css': None,
'extract_to': None,
'filter_css': u'',
'fix_indents': True,
'flow_size': 260,
'font_size_mapping': None,
'format_scene_breaks': True,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x000002A341286668>,
'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': True,
'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_default_epub_cover': False,
'no_inline_navbars': False,
'no_svg_cover': False,
'output_profile': <calibre.customize.profiles.KoboReaderOutput object at 0x000002A341286DD8>,
'page_breaks_before': u"//*[name()='h1' or name()='h2']",
'prefer_metadata_cover': False,
'preserve_cover_aspect_ratio': False,
'pretty_print': True,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': u'C:\\Users\\bart\\AppData\\Local\\Temp\\calibre_i si1no\\dsetxb.opf',
'remove_fake_margins': True,
'remove_first_image': False,
'remove_paragraph_spacing': True,
'remove_paragraph_spacing_indent_size': 1.5,
'renumber_headings': True,
'replace_scene_breaks': u'',
'search_replace': '[]',
'series': None,
'series_index': None,
'smarten_punctuation': True,
'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,
'transform_css_rules': '[]',
'unsmarten_punctuation': False,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: EPUB Input running
on C:\Users\bart\AppData\Local\Temp\calibre_isi1no\9p uxzh.epub
Found HTML cover OEBPS/Text/titlepage.xhtml
Parsing all content...
Parsing OEBPS/Text/28.xhtml ...
Parsing OEBPS/Text/36.xhtml ...
Parsing OEBPS/Text/27.xhtml ...
Parsing OEBPS/Text/10.xhtml ...
Parsing page_styles.css ...
Parsing OEBPS/Text/achterkant.xhtml ...
Parsing OEBPS/Text/2.xhtml ...
Parsing stylesheet.css ...
Parsing OEBPS/Text/11.xhtml ...
Parsing OEBPS/Text/1.xhtml ...
Parsing OEBPS/Text/24.xhtml ...
Parsing OEBPS/Text/21.xhtml ...
Parsing OEBPS/Text/29.xhtml ...
Parsing OEBPS/Text/25.xhtml ...
Parsing OEBPS/Text/12.xhtml ...
Parsing OEBPS/Text/3.xhtml ...
Parsing OEBPS/Text/26.xhtml ...
Parsing jacket.xhtml ...
Parsing OEBPS/Text/In memoriam.xhtml ...
Parsing OEBPS/Text/30.xhtml ...
Parsing OEBPS/Text/4.xhtml ...
Parsing OEBPS/Text/13.xhtml ...
Parsing OEBPS/Text/31.xhtml ...
Parsing OEBPS/Text/14.xhtml ...
Parsing OEBPS/Text/23.xhtml ...
Parsing OEBPS/Text/Titelpagina.xhtml ...
Parsing OEBPS/Text/5.xhtml ...
Parsing OEBPS/Text/15.xhtml ...
Parsing OEBPS/Text/32.xhtml ...
Parsing OEBPS/Text/16.xhtml ...
Parsing OEBPS/Text/Copyright.xhtml ...
Parsing OEBPS/Text/6.xhtml ...
Parsing OEBPS/Text/17.xhtml ...
Parsing OEBPS/Text/titlepage.xhtml ...
Parsing OEBPS/Text/Jacket.xhtml ...
Parsing OEBPS/Text/33.xhtml ...
Parsing OEBPS/Text/18.xhtml ...
Parsing OEBPS/Text/7.xhtml ...
Parsing OEBPS/Text/20.xhtml ...
Parsing OEBPS/Text/34.xhtml ...
Parsing OEBPS/Text/19.xhtml ...
Parsing OEBPS/Text/8.xhtml ...
Parsing OEBPS/Text/22.xhtml ...
Parsing OEBPS/Text/35.xhtml ...
Parsing OEBPS/Text/In memoriam.xhtml ...
Parsing OEBPS/Text/9.xhtml ...
Removing duplicate manifest item with id: id0
Reading TOC from NCX...
Merging user specified metadata...
Detecting structure...
Removed existing jacket
Flattening CSS and remapping font sizes...
Source base font size is 9.99996pt
Removing fake margins...
Found 1703 items of level: p_1
Found 1 items of level: div_1
p_1 left margin stats: Counter({u'0': 1703})
p_1 right margin stats: Counter({u'0': 1703})
div_1 left margin stats: Counter()
div_1 right margin stats: Counter()
No embedded fonts found
Cleaning up manifest...
Trimming unused files from manifest...
Trimming u'OEBPS/Text/titlepage.xhtml' from manifest
Creating EPUB Output...
Generating in-line ToC
Rescaling image from 452x751 to 413x686 OEBPS/Images/back.jpg
Rescaling image from 610x1000 to 418x686 cover.jpeg
Splitting markup on page breaks and flow limits, if any...
Looking for large trees in OEBPS/Text/28.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/36.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/27.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/10.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/achterkant.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/2.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/11.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/1.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/24.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/21.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/29.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/25.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/12.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/3.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/26.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/30.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/4.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/13.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/31.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/14.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/23.xhtml...
No large trees found
Splitting on page-break at id=calibre_pb_0
Splitting on page-break at id=sigil_toc_id_1
Looking for large trees in OEBPS/Text/Titelpagina.xhtml...
No large trees found
Split into 2 parts
Looking for large trees in OEBPS/Text/5.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/15.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/32.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/16.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/Copyright.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/6.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/17.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/Jacket.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/33.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/18.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/7.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/20.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/34.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/19.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/8.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/22.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/35.xhtml...
No large trees found
Looking for large trees in contents.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/In%20memoriam.xhtml...
No large trees found
Looking for large trees in OEBPS/Text/9.xhtml...
No large trees found
Removing anchor from TOC href: OEBPS/Text/Titelpagina_split_001.xhtml#sigil_toc_id_1
The cover image has an id != "cover". Renaming to work around bug in Nook Color
Upgrading to EPUB 3...
Python function terminated unexpectedly
'NoneType' object has no attribute 'find' (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 195, in main
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 33, in gui_convert_override
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 26, in gui_convert
File "site-packages\calibre\ebooks\conversion\plumber.py", line 1251, in run
File "site-packages\calibre\ebooks\conversion\plugins\epub_ou tput.py", line 260, in convert
File "site-packages\calibre\ebooks\conversion\plugins\epub_ou tput.py", line 301, in upgrade_to_epub3
File "site-packages\calibre\ebooks\oeb\polish\upgrade.py", line 126, in epub_2_to_3
File "site-packages\calibre\ebooks\oeb\polish\upgrade.py", line 112, in create_nav
File "site-packages\calibre\ebooks\oeb\polish\toc.py", line 662, in commit_nav_toc
File "site-packages\calibre\ebooks\oeb\polish\container.py", line 513, in href_to_name
File "site-packages\calibre\ebooks\oeb\polish\container.py", line 114, in href_to_name
File "urlparse.py", line 143, in urlparse
File "urlparse.py", line 182, in urlsplit
AttributeError: 'NoneType' object has no attribute 'find'

Last edited by theducks; 05-26-2018 at 05:43 PM. Reason: wrap HUGE past in SPOILER TAGS
Superbra is offline   Reply With Quote