Ticket #8094 (closed defect: duplicate)

Opened 2 years ago

Last modified 2 years ago

Python function terminated unexpectedly (Error code 1)

Reported by: lenno007 Owned by: kovidgoyal
Priority: default Milestone:
Component: Default Version: trunk
Keywords: Python Cc:

Description

I get this message when I try to convert a .PDF document to an EPUB format: "Python function terminated unexpectedly (Error code 1)". I am using Windows XP, SP3 and calibre 0.7.35.

I tried uninstalling and reinstalling Calibre but that did not work.

I tried installing an updated Python (but don't know if I installed it to the right directory). That did not work either.

I tried removing the calibre folder in my profile then re-opening calibre. That did not work either.

Please Help.

Owen

Change History

comment:1 Changed 2 years ago by kovidgoyal

You can get a more useful debug output by running calibre in debug mode by clicking the pull down arrow next to preferences.

comment:2 Changed 2 years ago by lenno007

This is the log that is created when I run calibre in debut mode.

calibre Debug log calibre 0.7.35 Windows-XP-5.1.2600-SP3 Windows ('Windows', 'XP', '5.1.2600') Python 2.7.0 Windows: ('XP', '5.1.2600', 'SP3', 'Multiprocessor Free') Starting up... Started up in 40.25 Job: 1 Convert book 1 of 1 (THE SMALL BUSINESS GUIDE U.S. 2011 EDITION) finished Convert book 1 of 1 (THE SMALL BUSINESS GUIDE U.S. 2011 EDITION)

Resolved conversion options calibre version: 0.7.35 {'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(., 'chapter|book|section|part|prologue|epilogue
s+', 'i')) or @class = 'chapter']", 'chapter_mark': u'pagebreak', 'comments': None, 'cover': 'c:
docume~1
sohail
locals~1
temp
calibre_0.7.35_tmp_4vjhui
calibre_0.7.35_a3ga57.jpeg', 'debug_pipeline': None, 'disable_font_rescaling': False, 'dont_compress': False, 'extra_css': None, 'font_size_mapping': None, 'footer_regex': u'(?i)(?<=<hr>)((
s*<a name=
d+></a>((<img.+?>)*<br>
s*)?
d+<br>
s*.*?
s*)|(
s*<a name=
d+></a>((<img.+?>)*<br>
s*)?.*?<br>
s*
d+))(?=<br>)', 'header_regex': u'(?i)(?<=<hr>)((
s*<a name=
d+></a>((<img.+?>)*<br>
s*)?
d+<br>
s*.*?
s*)|(
s*<a name=
d+></a>((<img.+?>)*<br>
s*)?.*?<br>
s*
d+))(?=<br>)', 'html_unwrap_factor': 0.4, 'input_encoding': None, 'input_profile': <calibre.customize.profiles.Input Profile? object at 0x044A21D0>, 'insert_blank_line': False, 'insert_metadata': False, 'isbn': None, '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, 'max_toc_links': 50, 'minimum_line_height': 120.0, 'mobi_ignore_margins': False, 'new_pdf_engine': False, 'no_chapters_in_toc': False, 'no_images': False, 'no_inline_navbars': True, 'no_inline_toc': False, 'output_profile': <calibre.customize.profiles.Kindle Output? object at 0x044A24B0>, 'page_breaks_before': u"
*[name()='h1' or name()='h2']", 'personal_doc': u'[PDOC]', 'prefer_author_sort': False, 'prefer_metadata_cover': False, 'preprocess_html': False, 'pretty_print': False, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': 'c:
docume~1
sohail
locals~1
temp
calibre_0.7.35_tmp_4vjhui
calibre_0.7.35_lgghcf.opf', 'remove_first_image': False, 'remove_footer': False, 'remove_header': False, 'remove_paragraph_spacing': False, 'remove_paragraph_spacing_indent_size': 1.5, 'rescale_images': False, 'series': None, 'series_index': None, 'smarten_punctuation': False, 'tags': None, 'timestamp': None, 'title': None, 'title_sort': None, 'toc_filter': None, 'toc_threshold': 6, 'toc_title': None, 'unwrap_factor': 0.45, 'use_auto_toc': False, 'verbose': 2}

Input Format Plugin?: PDF Input running on C:\Documents and Settings\Sohail\My Documents\BOOK\CALIBRE BOOKS\Owen O. Daniels\THE SMALL BUSINESS GUIDE U.S. 2011 EDITI (2)\THE SMALL BUSINESS GUIDE U.S. 2011 EDITI - Owen O. Daniels.pdf Converting file to html... Python function terminated unexpectedly

(Error Code: 1)

Traceback (most recent call last):

File "site.py", line 103, in main File "site.py", line 85, in run_entry_point File "site-packages\calibre\utils\ipc\worker.py", line 107, in main File "site-packages\calibre\gui2\convert\gui_conversion.py", line 24, in gui_convert File "site-packages\calibre\ebooks\conversion\plumber.py", line 853, in run File "site-packages\calibre\customize\conversion.py", line 216, in call File "site-packages\calibre\ebooks\pdf\input.py", line 50, in convert File "site-packages\calibre\ebooks\pdf\pdftohtml.py", line 72, in pdftohtml

calibre.ebooks.Conversion Error?

Convert book 1 of 1 (THE SMALL BUSINESS GUIDE U.S. 2011 EDITION) Resolved conversion options calibre version: 0.7.35 {'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(., 'chapter|book|section|part|prologue|epilogue
s+', 'i')) or @class = 'chapter']", 'chapter_mark': u'pagebreak', 'comments': None, 'cover': 'c:
docume~1
sohail
locals~1
temp
calibre_0.7.35_tmp_4vjhui
calibre_0.7.35_a3ga57.jpeg', 'debug_pipeline': None, 'disable_font_rescaling': False, 'dont_compress': False, 'extra_css': None, 'font_size_mapping': None, 'footer_regex': u'(?i)(?<=<hr>)((
s*<a name=
d+></a>((<img.+?>)*<br>
s*)?
d+<br>
s*.*?
s*)|(
s*<a name=
d+></a>((<img.+?>)*<br>
s*)?.*?<br>
s*
d+))(?=<br>)', 'header_regex': u'(?i)(?<=<hr>)((
s*<a name=
d+></a>((<img.+?>)*<br>
s*)?
d+<br>
s*.*?
s*)|(
s*<a name=
d+></a>((<img.+?>)*<br>
s*)?.*?<br>
s*
d+))(?=<br>)', 'html_unwrap_factor': 0.4, 'input_encoding': None, 'input_profile': <calibre.customize.profiles.Input Profile? object at 0x044A21D0>, 'insert_blank_line': False, 'insert_metadata': False, 'isbn': None, '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, 'max_toc_links': 50, 'minimum_line_height': 120.0, 'mobi_ignore_margins': False, 'new_pdf_engine': False, 'no_chapters_in_toc': False, 'no_images': False, 'no_inline_navbars': True, 'no_inline_toc': False, 'output_profile': <calibre.customize.profiles.Kindle Output? object at 0x044A24B0>, 'page_breaks_before': u"
*[name()='h1' or name()='h2']", 'personal_doc': u'[PDOC]', 'prefer_author_sort': False, 'prefer_metadata_cover': False, 'preprocess_html': False, 'pretty_print': False, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': 'c:
docume~1
sohail
locals~1
temp
calibre_0.7.35_tmp_4vjhui
calibre_0.7.35_lgghcf.opf', 'remove_first_image': False, 'remove_footer': False, 'remove_header': False, 'remove_paragraph_spacing': False, 'remove_paragraph_spacing_indent_size': 1.5, 'rescale_images': False, 'series': None, 'series_index': None, 'smarten_punctuation': False, 'tags': None, 'timestamp': None, 'title': None, 'title_sort': None, 'toc_filter': None, 'toc_threshold': 6, 'toc_title': None, 'unwrap_factor': 0.45, 'use_auto_toc': False, 'verbose': 2}

Input Format Plugin?: PDF Input running on C:\Documents and Settings\Sohail\My Documents\BOOK\CALIBRE BOOKS\Owen O. Daniels\THE SMALL BUSINESS GUIDE U.S. 2011 EDITI (2)\THE SMALL BUSINESS GUIDE U.S. 2011 EDITI - Owen O. Daniels.pdf Converting file to html... Python function terminated unexpectedly

(Error Code: 1)

Traceback (most recent call last):

File "site.py", line 103, in main File "site.py", line 85, in run_entry_point File "site-packages\calibre\utils\ipc\worker.py", line 107, in main File "site-packages\calibre\gui2\convert\gui_conversion.py", line 24, in gui_convert File "site-packages\calibre\ebooks\conversion\plumber.py", line 853, in run File "site-packages\calibre\customize\conversion.py", line 216, in call File "site-packages\calibre\ebooks\pdf\input.py", line 50, in convert File "site-packages\calibre\ebooks\pdf\pdftohtml.py", line 72, in pdftohtml

calibre.ebooks.Conversion Error?

comment:3 Changed 2 years ago by kovidgoyal

  • Status changed from new to closed
  • Resolution set to duplicate

That error means the PDf file could not be converted, there cn be many reasons for that. You will have to find your document in a non pdf format to convert.

Note: See TracTickets for help on using tickets.