Calibre 4.0 will not convert odt to mobi

Bug #1846952 reported by Bob Englert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
New
Undecided
Unassigned

Bug Description

When trying to convert a .odt file created in OpenOffice 4.1.7 to mobi I get the following error:

Failed: Convert book 1 of 1

Trying to convert to ePub gives the same error. I have had no problems previously with v3.48. I am attaching the file I was trying to convert. I am running Calibre 4.0 on a MacBook Pro laptop running macOS v12.14.6.

The output log is shown below:

calibre, version 4.0.0 (darwin, embedded-python: True)
Conversion error: Failed: Convert book 1 of 1 (One Rule For You - Another For Me)

Convert book 1 of 1 (One Rule For You - Another For Me)
Conversion options changed from defaults:
  output_profile: u'kindle_pw3'
  read_metadata_from_opf: u'/var/folders/ss/33nkxqrs2mxbb030nq3rcfzs74cfpb/C/calibre_4.0.0_tmp_JrBgb1/88UQ28.opf'
  verbose: 2
  insert_blank_line_size: 0.6
  insert_blank_line: True
Resolved conversion options
calibre version: 4.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': None,
 '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 0x10e616e90>,
 'insert_blank_line': True,
 'insert_blank_line_size': 0.6,
 '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_file_type': u'old',
 'mobi_ignore_margins': False,
 'mobi_keep_original_images': False,
 'mobi_toc_at_start': False,
 'no_chapters_in_toc': False,
 'no_inline_navbars': True,
 'no_inline_toc': False,
 'output_profile': <calibre.customize.profiles.KindlePaperWhite3Output object at 0x10e61c6d0>,
 'page_breaks_before': u"//*[name()='h1' or name()='h2']",
 'personal_doc': u'[PDOC]',
 'prefer_author_sort': False,
 'prefer_metadata_cover': False,
 'pretty_print': False,
 'pubdate': None,
 'publisher': None,
 'rating': None,
 'read_metadata_from_opf': u'/var/folders/ss/33nkxqrs2mxbb030nq3rcfzs74cfpb/C/calibre_4.0.0_tmp_JrBgb1/88UQ28.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,
 'transform_css_rules': '[]',
 'unsmarten_punctuation': False,
 'unwrap_lines': True,
 'use_auto_toc': False,
 'verbose': 2}
InputFormatPlugin: ODT Input running
on /var/folders/ss/33nkxqrs2mxbb030nq3rcfzs74cfpb/C/calibre_4.0.0_tmp_JrBgb1/GtVA73.odt
Extracting ODT file...
Python function terminated unexpectedly: u'keywords'
Traceback (most recent call last):
  File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 163, in main
    return run_entry_point()
  File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 121, in run_entry_point
    return getattr(pmod, func)()
  File "site-packages/calibre/utils/ipc/worker.py", line 208, in main
  File "site-packages/calibre/gui2/convert/gui_conversion.py", line 43, in gui_convert_override
  File "site-packages/calibre/gui2/convert/gui_conversion.py", line 28, in gui_convert
  File "site-packages/calibre/ebooks/conversion/plumber.py", line 1110, in run
  File "site-packages/calibre/customize/conversion.py", line 246, in __call__
  File "site-packages/calibre/ebooks/conversion/plugins/odt_input.py", line 25, in convert
  File "site-packages/calibre/ebooks/odt/input.py", line 276, in __call__
  File "site-packages/calibre/ebooks/metadata/odt.py", line 91, in get_metadata
  File "site-packages/calibre/ebooks/metadata/odt.py", line 73, in find
KeyError: u'keywords'

Revision history for this message
Bob Englert (rjenglert) wrote :
Revision history for this message
Eli Schwartz (eschwartz) wrote : Re: [Bug 1846952] [NEW] Calibre 4.0 will not convert odt to mobi

This is fixed in the development version of calibre via
https://github.com/kovidgoyal/calibre/commit/b72922e94c340953434778a0792c8244bf012c57

The fix will be in the next release of calibre, calibre is released most
Fridays. I expect Kovid will most likely be releasing a new version this
Friday, and not waiting another week, because there have been a bunch of
fixes.

 duplicate 1846828

Revision history for this message
Bob Englert (rjenglert) wrote : Re: [Bug 1846952] Re: Calibre 4.0 will not convert odt to mobi
Download full text (6.2 KiB)

This is NOT a duplicate of the bug you mentioned. Calibre 4.0 will not
CONVERT odt files into mobi or epub formats. THis has nothing to do with
the ebook reader function in Calibre.

Bob

On Sun, Oct 6, 2019 at 10:20 AM Kovid Goyal <email address hidden>
wrote:

> *** This bug is a duplicate of bug 1846828 ***
> https://bugs.launchpad.net/bugs/1846828
>
> ** This bug has been marked a duplicate of bug 1846828
> e-book reader does not read .odt files
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1846952
>
> Title:
> Calibre 4.0 will not convert odt to mobi
>
> Status in calibre:
> New
>
> Bug description:
> When trying to convert a .odt file created in OpenOffice 4.1.7 to mobi
> I get the following error:
>
> Failed: Convert book 1 of 1
>
> Trying to convert to ePub gives the same error. I have had no
> problems previously with v3.48. I am attaching the file I was trying
> to convert. I am running Calibre 4.0 on a MacBook Pro laptop running
> macOS v12.14.6.
>
> The output log is shown below:
>
> calibre, version 4.0.0 (darwin, embedded-python: True)
> Conversion error: Failed: Convert book 1 of 1 (One Rule For You -
> Another For Me)
>
> Convert book 1 of 1 (One Rule For You - Another For Me)
> Conversion options changed from defaults:
> output_profile: u'kindle_pw3'
> read_metadata_from_opf:
> u'/var/folders/ss/33nkxqrs2mxbb030nq3rcfzs74cfpb/C/calibre_4.0.0_tmp_JrBgb1/88UQ28.opf'
> verbose: 2
> insert_blank_line_size: 0.6
> insert_blank_line: True
> Resolved conversion options
> calibre version: 4.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': None,
> '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
> 0x10e616e90>,
> 'insert_blank_line': True,
> 'insert_blank_line_size': 0.6,
> '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_cha...

Read more...

Revision history for this message
Eli Schwartz (eschwartz) wrote :

The ebook reader is internally implemented by converting ebooks from
ODT, MOBI, EPUB, and anything else into a common representation, the OEB
base format, using the conversion pipeline.

The bug I mentioned was triggered by the odt_input conversion plugin,
and ultimately came from the ODT metadata reader plugin.

Is there a reason you're claiming to be such an expert calibre developer
that you know this other bug is unrelated? If so, I eagerly await your
patch submission that fixes this. Given that you've done all the
in-depth analysis of the causes, it seems like having you provide the
code for the fix would be the most effective way of getting this resolved.

Revision history for this message
Bob Englert (rjenglert) wrote :
Download full text (7.1 KiB)

Given the attitude displayed to a Calibre user that had a serious problem
trying to convert files and was making an effort to report the problem I
was experiencing, I will not bother to report issues in the future.

I was trying to report that I was using the conversion function, not the
ebook reader. I have no understanding of the code, and was not trying to
tell you how to do it.

Best of luck. I will not waste any of your time in the future.

On Sun, Oct 6, 2019 at 5:55 PM Eli Schwartz <email address hidden>
wrote:

> *** This bug is a duplicate of bug 1846828 ***
> https://bugs.launchpad.net/bugs/1846828
>
> The ebook reader is internally implemented by converting ebooks from
> ODT, MOBI, EPUB, and anything else into a common representation, the OEB
> base format, using the conversion pipeline.
>
> The bug I mentioned was triggered by the odt_input conversion plugin,
> and ultimately came from the ODT metadata reader plugin.
>
> Is there a reason you're claiming to be such an expert calibre developer
> that you know this other bug is unrelated? If so, I eagerly await your
> patch submission that fixes this. Given that you've done all the
> in-depth analysis of the causes, it seems like having you provide the
> code for the fix would be the most effective way of getting this resolved.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1846952
>
> Title:
> Calibre 4.0 will not convert odt to mobi
>
> Status in calibre:
> New
>
> Bug description:
> When trying to convert a .odt file created in OpenOffice 4.1.7 to mobi
> I get the following error:
>
> Failed: Convert book 1 of 1
>
> Trying to convert to ePub gives the same error. I have had no
> problems previously with v3.48. I am attaching the file I was trying
> to convert. I am running Calibre 4.0 on a MacBook Pro laptop running
> macOS v12.14.6.
>
> The output log is shown below:
>
> calibre, version 4.0.0 (darwin, embedded-python: True)
> Conversion error: Failed: Convert book 1 of 1 (One Rule For You -
> Another For Me)
>
> Convert book 1 of 1 (One Rule For You - Another For Me)
> Conversion options changed from defaults:
> output_profile: u'kindle_pw3'
> read_metadata_from_opf:
> u'/var/folders/ss/33nkxqrs2mxbb030nq3rcfzs74cfpb/C/calibre_4.0.0_tmp_JrBgb1/88UQ28.opf'
> verbose: 2
> insert_blank_line_size: 0.6
> insert_blank_line: True
> Resolved conversion options
> calibre version: 4.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': None,
> '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_...

Read more...

Revision history for this message
Eli Schwartz (eschwartz) wrote :

> Given the attitude displayed to a Calibre user that had a serious problem
> trying to convert files and was making an effort to report the problem I
> was experiencing, I will not bother to report issues in the future.
>
> I was trying to report that I was using the conversion function, not the
> ebook reader. I have no understanding of the code, and was not trying to
> tell you how to do it.
>
> Best of luck. I will not waste any of your time in the future.

Okay... my snark aside (and please note that I am not at all in charge
of calibre, I am merely a heavy user and currently active contributor) I
am really just saying that I *know* that your bug is related, and I
*know* that the fact that it was initially reported against the ebook
reader has no bearing on whether it *also* affects the conversion function.

I am attempting to help you, by telling you "good news, this is a known
bug and it is fixed in the upcoming release". You responded by very
confidently saying "no it isn't", which surprised me -- I would
ordinarily expect a response more similar to "that bug is about the
ebook viewer, not the conversion function, are you sure it solves my
issue too?" in which case I would reassure you "yes, don't worry -- they
both use the same code".

My response was a possibly confusing way of hinting "unless you do
consider yourself a developer, it might not entirely make sense to try
analyzing whether two bugs share the same root cause. The other person
might know something surprising that ties the two together."

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.