ePub to PDF convertion failed

Bug #1360842 reported by gabriel.marinho
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

I've tried to convert a ePub book to PDF format, but is didn't work.

The details of the error convertion are below:

calibre, version 2.0.0 (win32, isfrozen: True)
Erro ao converter: Falha: Converter livro 1 de 1 (Manual de Direito Constituicional - Volume Único)

Converter livro 1 de 1 (Manual de Direito Constituicional - Volume Único)
C:\Program Files\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.0.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\\Gabriel\\AppData\\Local\\Temp\\calibre_ygot3_\\kktfai.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 0x02603190>,
 '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,
 'old_pdf_engine': False,
 'output_profile': <calibre.customize.profiles.OutputProfile object at 0x02603370>,
 'override_profile_size': False,
 '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_mark_links': False,
 'pdf_mono_family': u'Courier New',
 'pdf_mono_font_size': 16,
 'pdf_page_numbers': False,
 'pdf_sans_family': u'Arial',
 'pdf_serif_family': u'Times New Roman',
 'pdf_standard_font': u'serif',
 '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\\Gabriel\\AppData\\Local\\Temp\\calibre_ygot3_\\x1dvlr.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,
 'uncompressed_pdf': False,
 'unit': u'inch',
 'unsmarten_punctuation': False,
 'unwrap_lines': True,
 'use_auto_toc': False,
 'verbose': 2}
InputFormatPlugin: EPUB Input running
on C:\Users\Gabriel\AppData\Local\Temp\calibre_ygot3_\uvpt3j.epub
Found HTML cover OEBPS/Text/cover.xhtml
Parsing all content...
Parsing OEBPS/Text/ch09.xhtml ...
Parsing OEBPS/Text/ch09a.xhtml ...
Parsing OEBPS/Text/part2.xhtml ...
Parsing OEBPS/Text/ch10.xhtml ...
Parsing OEBPS/Text/ch11.xhtml ...
Parsing OEBPS/Text/ch12.xhtml ...
Parsing OEBPS/Text/ch13.xhtml ...
Parsing OEBPS/Text/ch14.xhtml ...
Parsing OEBPS/Text/ch15.xhtml ...
Parsing OEBPS/Text/ch16.xhtml ...
Parsing OEBPS/Text/ch17.xhtml ...
Parsing OEBPS/Text/ch33.xhtml ...
Parsing OEBPS/Text/ch18.xhtml ...
Parsing OEBPS/Text/ch34.xhtml ...
Parsing OEBPS/Text/chap34a.xhtml ...
Parsing OEBPS/Text/ch18a.xhtml ...
Parsing OEBPS/Text/part6.xhtml ...
Parsing OEBPS/Text/ch35.xhtml ...
Parsing OEBPS/Text/part3.xhtml ...
Parsing OEBPS/Text/ch36.xhtml ...
Parsing OEBPS/Text/ch37.xhtml ...
Parsing OEBPS/Text/ch19.xhtml ...
Parsing OEBPS/Text/ch38.xhtml ...
Parsing OEBPS/Text/ch39.xhtml ...
Parsing OEBPS/Text/ch20.xhtml ...
Parsing OEBPS/Text/chap39a.xhtml ...
Parsing OEBPS/Text/part7.xhtml ...
Parsing OEBPS/Text/ch20a.xhtml ...
Parsing OEBPS/Text/ch40.xhtml ...
Parsing OEBPS/Text/ch41.xhtml ...
Parsing OEBPS/Text/part4.xhtml ...
Parsing OEBPS/Text/ch42.xhtml ...
Parsing OEBPS/Text/chap42a.xhtml ...
Parsing OEBPS/Text/ch21.xhtml ...
Parsing OEBPS/Text/part8.xhtml ...
Parsing OEBPS/Text/ch43.xhtml ...
Parsing OEBPS/Text/ch22.xhtml ...
Parsing OEBPS/Text/ch44.xhtml ...
Parsing OEBPS/Text/ch45.xhtml ...
Parsing OEBPS/Text/ch23.xhtml ...
Parsing OEBPS/Text/chap45a.xhtml ...
Parsing OEBPS/Text/part9.xhtml ...
Parsing OEBPS/Text/ch24.xhtml ...
Parsing OEBPS/Text/ch46.xhtml ...
Parsing OEBPS/Text/ch47.xhtml ...
Parsing OEBPS/Text/ch25.xhtml ...
Parsing OEBPS/Text/ch48.xhtml ...
Parsing OEBPS/Text/ch49.xhtml ...
Parsing OEBPS/Text/ch26.xhtml ...
Parsing OEBPS/Text/chap49a.xhtml ...
Parsing OEBPS/Text/biblio.xhtml ...
Parsing OEBPS/Text/ch27.xhtml ...
Parsing OEBPS/Text/indice.xhtml ...
Parsing OEBPS/Text/ch28.xhtml ...
Parsing OEBPS/Text/ch29.xhtml ...
Parsing OEBPS/Text/chap29a.xhtml ...
Parsing OEBPS/Text/part5.xhtml ...
Parsing OEBPS/Text/ch30.xhtml ...
Parsing OEBPS/Text/ch31.xhtml ...
Parsing OEBPS/Text/ch32.xhtml ...
Parsing OEBPS/Styles/9788530954956.css ...
Parsing OEBPS/Styles/9788530954956_cover.css ...
Parsing OEBPS/Text/cover.xhtml ...
Parsing OEBPS/Text/htitle.xhtml ...
Parsing OEBPS/Text/gen.xhtml ...
Parsing OEBPS/Text/title.xhtml ...
Parsing OEBPS/Text/copy.xhtml ...
Parsing OEBPS/Text/nota.xhtml ...
Parsing OEBPS/Text/pre.xhtml ...
Parsing OEBPS/Text/abrevi.xhtml ...
Parsing OEBPS/Text/toc.xhtml ...
Parsing OEBPS/Text/part1.xhtml ...
Parsing OEBPS/Text/fm.xhtml ...
Parsing OEBPS/Text/ch01.xhtml ...
Parsing OEBPS/Text/ch02.xhtml ...
Parsing OEBPS/Text/ch03.xhtml ...
Parsing OEBPS/Text/ch04.xhtml ...
Parsing OEBPS/Text/ch05.xhtml ...
Parsing OEBPS/Text/ch06.xhtml ...
Parsing OEBPS/Text/ch07.xhtml ...
Parsing OEBPS/Text/ch08.xhtml ...
Reading TOC from NCX...
Merging user specified metadata...
Detecting structure...
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Removing fake margins...
Found 283 items of level: div_1
Found 1144 items of level: p_2
Found 12233 items of level: p_1
div_1 left margin stats: Counter({u'0': 75, u'': 21})
div_1 right margin stats: Counter({u'0': 75, u'': 21})
p_2 left margin stats: Counter({u'0': 1140, u'0.1em': 4})
p_2 right margin stats: Counter({u'0': 861, u'0.1em': 283})
Negative text indent detected at level p_1, ignoring this level
Cleaning up manifest...
Trimming unused files from manifest...
Trimming u'OEBPS/Images/pg217.jpg' from manifest
Trimming u'OEBPS/Images/mensagem_gen_cor.jpg' from manifest
Trimming u'OEBPS/Images/p041.jpg' from manifest
Trimming u'OEBPS/Images/img011.jpg' from manifest
Trimming u'OEBPS/Images/im786.jpg' from manifest
Trimming u'OEBPS/Images/im838.jpg' from manifest
Trimming u'OEBPS/Images/pg117.jpg' from manifest
Trimming u'OEBPS/Images/p054.jpg' from manifest
Trimming u'OEBPS/Images/im894.jpg' from manifest
Trimming u'OEBPS/Images/common.jpg' from manifest
Trimming u'OEBPS/Images/p083.jpg' from manifest
Trimming u'OEBPS/Images/img014.jpg' from manifest
Trimming u'OEBPS/Images/image4.jpg' from manifest
Trimming u'OEBPS/Images/image5.jpg' from manifest
Trimming u'OEBPS/Images/image6.jpg' from manifest
Trimming u'OEBPS/Images/image7.jpg' from manifest
Trimming u'OEBPS/Images/image8.jpg' from manifest
Trimming u'OEBPS/Images/image9.jpg' from manifest
Trimming u'OEBPS/Images/p002.jpg' from manifest
Trimming u'OEBPS/Images/img001.jpg' from manifest
Trimming u'OEBPS/Images/p_397.jpg' from manifest
Trimming u'OEBPS/Images/img002.jpg' from manifest
Trimming u'OEBPS/Images/img003.jpg' from manifest
Trimming u'OEBPS/Images/img004.jpg' from manifest
Trimming u'OEBPS/Text/cover.xhtml' from manifest
Trimming u'OEBPS/Images/img005.jpg' from manifest
Trimming u'OEBPS/Images/p005.jpg' from manifest
Trimming u'OEBPS/Images/img007.jpg' from manifest
Trimming u'OEBPS/Images/p_273.jpg' from manifest
Trimming u'OEBPS/Images/p_373.jpg' from manifest
Trimming u'OEBPS/Images/pg170.jpg' from manifest
Trimming u'OEBPS/Images/img009.jpg' from manifest
Trimming u'OEBPS/Images/pg178.jpg' from manifest
Trimming u'OEBPS/Images/img010.jpg' from manifest
Trimming u'OEBPS/Images/pg138.jpg' from manifest
Trimming u'OEBPS/Images/pg240.jpg' from manifest
Trimming u'OEBPS/Images/pg246.jpg' from manifest
Trimming u'OEBPS/Images/pg151.jpg' from manifest
Trimming u'OEBPS/Images/image1.jpg' from manifest
Trimming u'OEBPS/Images/pg247.jpg' from manifest
Trimming u'OEBPS/Images/p040.jpg' from manifest
Trimming u'OEBPS/Images/image10.jpg' from manifest
Trimming u'OEBPS/Images/image2.jpg' from manifest
Trimming u'OEBPS/Images/image3.jpg' from manifest
Creating PDF Output...
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
Python function terminated unexpectedly
  u'bottom' (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 195, 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 1195, in run
  File "site-packages\calibre\ebooks\conversion\plugins\pdf_output.py", line 145, in convert
  File "site-packages\calibre\ebooks\conversion\plugins\pdf_output.py", line 262, in convert_text
  File "site-packages\calibre\ebooks\conversion\plugins\oeb_output.py", line 61, in convert
  File "site-packages\calibre\ebooks\oeb\normalize_css.py", line 278, in condense_sheet
  File "site-packages\calibre\ebooks\oeb\normalize_css.py", line 273, in condense_rule
  File "site-packages\calibre\ebooks\oeb\normalize_css.py", line 231, in condense_simple
  File "site-packages\calibre\ebooks\oeb\normalize_css.py", line 213, in condense_edge
KeyError: u'bottom'

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

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
gabriel.marinho (gabrielg3djes) wrote :

This is the epub file

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
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.