Cannot convert epub book

Bug #1482983 reported by Ana
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

I am not able to convert an epub ebook in calibre into azw3 or mobi. It gives the same error everytime:

calibre, version 2.34.0 (win32, isfrozen: True)
Erro de conversão: Falha: Converter livros 1 de 1 (A Setima Porta)

Converter livros 1 de 1 (A Setima Porta)
C:\Program Files (x86)\Calibre2\pylib.zip\dateutil\parser.py:339: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
Resolved conversion options
calibre version: 2.34.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\\Ana\\AppData\\Local\\Temp\\calibre_l_a0lk\\pcdoxw.jpeg',
 'debug_pipeline': None,
 'dehyphenate': True,
 'delete_blank_paragraphs': True,
 'disable_font_rescaling': False,
 'dont_compress': False,
 '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 0x03058A10>,
 '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,
 'mobi_toc_at_start': False,
 'no_chapters_in_toc': False,
 'no_inline_navbars': False,
 'no_inline_toc': False,
 'output_profile': <calibre.customize.profiles.OutputProfile object at 0x03058BF0>,
 'page_breaks_before': u'/',
 'prefer_author_sort': False,
 'prefer_metadata_cover': False,
 'pretty_print': False,
 'pubdate': None,
 'publisher': None,
 'rating': None,
 'read_metadata_from_opf': u'C:\\Users\\Ana\\AppData\\Local\\Temp\\calibre_l_a0lk\\twljwr.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,
 'share_not_sync': False,
 '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,
 'unsmarten_punctuation': False,
 'unwrap_lines': True,
 'use_auto_toc': False,
 'verbose': 2}
InputFormatPlugin: EPUB Input running
on C:\Users\Ana\AppData\Local\Temp\calibre_l_a0lk\o7fzzp.epub
Found HTML cover OEBPS/Text/Capa.xhtml
Parsing all content...
Parsing OEBPS/Text/Agradecimentos.xhtml ...
Parsing OEBPS/Text/Dedic.xhtml ...
Parsing OEBPS/Text/Nota.xhtml ...
Parsing OEBPS/Text/Prefacio.xhtml ...
Parsing OEBPS/Text/024.xhtml ...
Parsing OEBPS/Text/Sep01.xhtml ...
Parsing OEBPS/Text/Bio.xhtml ...
Parsing OEBPS/Text/001.xhtml ...
Parsing OEBPS/Styles/004_mediaquery.css ...
Parsing OEBPS/Text/002.xhtml ...
Parsing OEBPS/Text/003.xhtml ...
Parsing OEBPS/Text/Ficha.xhtml ...
Parsing OEBPS/Text/004.xhtml ...
Parsing OEBPS/Text/005.xhtml ...
Parsing OEBPS/Styles/003_ft.css ...
Parsing OEBPS/Text/Sep02.xhtml ...
Parsing OEBPS/Text/006.xhtml ...
Parsing OEBPS/Text/007.xhtml ...
Parsing OEBPS/Text/Sep03.xhtml ...
Parsing OEBPS/Text/008.xhtml ...
Parsing OEBPS/Text/009.xhtml ...
Parsing OEBPS/Styles/002_text.css ...
Parsing OEBPS/Text/010.xhtml ...
Parsing OEBPS/Text/011.xhtml ...
Parsing OEBPS/Text/012.xhtml ...
Parsing OEBPS/Text/023.xhtml ...
Parsing OEBPS/Text/Sep04.xhtml ...
Parsing OEBPS/Text/013.xhtml ...
Parsing OEBPS/Text/014.xhtml ...
Parsing OEBPS/Styles/001_cover.css ...
Parsing OEBPS/Text/015.xhtml ...
Parsing OEBPS/Text/016.xhtml ...
Parsing OEBPS/Text/Sep05.xhtml ...
Parsing OEBPS/Text/017.xhtml ...
Parsing OEBPS/Text/018.xhtml ...
Parsing OEBPS/Text/019.xhtml ...
Parsing OEBPS/Text/026.xhtml ...
Parsing OEBPS/Text/Sep06.xhtml ...
Parsing OEBPS/Text/020.xhtml ...
Parsing OEBPS/Text/021.xhtml ...
Parsing OEBPS/Text/022.xhtml ...
Parsing OEBPS/Text/025.xhtml ...
Parsing OEBPS/Text/Mapa.xhtml ...
Parsing OEBPS/Text/Sep07.xhtml ...
Parsing OEBPS/Text/Capa.xhtml ...
Reading TOC from NCX...
Merging user specified metadata...
Detecting structure...
 Detected chapter: Capítulo 2
 Detected chapter: Capítulo 3
 Detected chapter: Capítulo 4
 Detected chapter: Capítulo 5
 Detected chapter: Capítulo 7
 Detected chapter: Capítulo 9
 Detected chapter: Capítulo 10
 Detected chapter: Capítulo 11
 Detected chapter: Capítulo 12
 Detected chapter: Capítulo 14
 Detected chapter: Capítulo 15
 Detected chapter: Capítulo 16
 Detected chapter: Capítulo 18
 Detected chapter: Capítulo 19
 Detected chapter: Capítulo 21
 Detected chapter: Capítulo 22
 Detected chapter: Capítulo 24
 Detected chapter: Capítulo 25
 Detected chapter: Capítulo 26
Flattening CSS and remapping font sizes...
Python function terminated unexpectedly
  'CSSComment' object has no attribute 'mediaType' (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 193, 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 1155, in run
  File "site-packages\calibre\ebooks\oeb\transforms\flatcss.py", line 187, in __call__
  File "site-packages\calibre\ebooks\oeb\transforms\flatcss.py", line 266, in stylize_spine
  File "site-packages\calibre\ebooks\oeb\stylizer.py", line 211, in __init__
  File "site-packages\calibre\ebooks\oeb\stylizer.py", line 210, in <setcomp>
  File "site-packages\cssutils-1.0-py2.7.egg\cssutils\stylesheets\medialist.py", line 259, in item
AttributeError: 'CSSComment' object has no attribute 'mediaType'

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1482983

Attach the EPUB file demonstrating/reproducing the problem to this bug report. You can do that by clicking the "Add attachment or patch" link at the bottom of the bug's page. If the file you are attaching is copyrighted, mark the bug as private. You can do this by clicking the tiny lock icon next to "This report contains Public information" in the top right area of the bug's page.

 status incomplete

Changed in calibre:
status: New → Incomplete
Revision history for this message
Ana (ana-vanessa-gomes) wrote :
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 Friday.

 status fixreleased

Changed in calibre:
status: Incomplete → Fix Released
Revision history for this message
Ana (ana-vanessa-gomes) wrote :

It worked perfectly. Thanks

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.