View Single Post
Old 08-29-2014, 04:21 PM   #33
rebl
r.eads e.njoys b.ooks lol
rebl ought to be getting tired of karma fortunes by now.rebl ought to be getting tired of karma fortunes by now.rebl ought to be getting tired of karma fortunes by now.rebl ought to be getting tired of karma fortunes by now.rebl ought to be getting tired of karma fortunes by now.rebl ought to be getting tired of karma fortunes by now.rebl ought to be getting tired of karma fortunes by now.rebl ought to be getting tired of karma fortunes by now.rebl ought to be getting tired of karma fortunes by now.rebl ought to be getting tired of karma fortunes by now.rebl ought to be getting tired of karma fortunes by now.
 
rebl's Avatar
 
Posts: 76
Karma: 580748
Join Date: Mar 2010
Location: It's time to get this Book a Rest
Device: Kindle 4 NT
Hi all and thank you again for all you guys do.
BetterRed, In post #5 I was writing I've also tried editing the doc_input.py file (I'm not sure if it's the same) but somehow it hasn't worked:

Quote:
I found the doc_input.py file in folder Calibre Settings\conversion
and manually edited path to
u'wordconv_exe_path' : u'C:\\Program Files (x86)\\Microsoft
This is quite bizare! Even after I've corrected the path by editing the file (and checked in GUI, it's there) the plugin still looks for Office12, like it's hardcoded.
I haven't noticed the duplicate entry in input preferences and now it's too late to see that, since i've upgraded to 1.0.1.

I've tested the plugin again and I noticed the following:
1. In Preferences -> Input -> DOC it is possible to change the default path and appears to be saved.
I had to change it to:
C:/Program Files (x86)/Microsoft Office/Office12/Wordconv.exe
2. When trying to do a bulk conversion from 3 DOC-only books, I get the same error as listed in post #23
3. Then I've changed the path to
C:/Program Files (x86)/Microsoft Office/Office14/Wordconv.exe
because I do have both intances of wordconv.exe (files seem to be identical)
but the error persisted:

Code:
Convert book 3 of 3 (Monte Cassino)
Resolved conversion options
calibre version: 2.1.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,
 'docx_no_cover': 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 0x0000000004A9EA20>,
 '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.KindleOutput object at 0x0000000004A9EFD0>,
 'page_breaks_before': '/',
 'prefer_author_sort': False,
 'prefer_metadata_cover': False,
 'pretty_print': False,
 'pubdate': None,
 'publisher': None,
 'rating': None,
 'read_metadata_from_opf': u'C:\\Users\\xxxx\\AppData\\Local\\Temp\\calibre_9kuik7\\vetaot.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,
 'wordconv_exe_path': u'c:\\Program Files\\Microsoft Office\\Office12\\Wordconv.exe'}
InputFormatPlugin: DOC Input running
on C:\Users\xxxx\AppData\Local\Temp\calibre_9kuik7\kzqevx.doc
Convert doc C:\Users\xxxx\AppData\Local\Temp\calibre_9kuik7\kzqevx.doc to docx via c:\Program Files\Microsoft Office\Office12\Wordconv.exe
Temp directory C:\Users\xxxx\AppData\Local\Temp\calibre_9kuik7\xckythdoc_input temp output fileC:\Users\xxxx\AppData\Local\Temp\calibre_9kuik7\xckythdoc_input\kzqevx.doc.docx
Python function terminated unexpectedly
  Not found c:\Program Files\Microsoft Office\Office12\Wordconv.exe (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 1041, in run
  File "site-packages\calibre\customize\conversion.py", line 241, in __call__
  File "calibre_plugins.doc_input.__init__", line 51, in convert
ValueError: Not found c:\Program Files\Microsoft Office\Office12\Wordconv.exe
My calibre installation (x64 2.1) is pretty much default settings with a few minor tweaks related to date format and custom columns.
It seems to me that even if the Preferences -> Input -> Doc saves the correct path or even if editing manually the py file, somehow the plugin's code contains the wrong (32-bit only) path, used in the code as a constant and not using the externalized variable.

This can also be noticed if starting a single book conversion. Even after the path in preferences has been edited, the path in the single book conversion is still the old one.
In the attached picture you can see the discrepancy between the path saved in preferences and the path the plugin is using for a single book conversion (supposedly, the same is used in bulk conversion but you can't edit it the latter case).
Attached Thumbnails
Click image for larger version

Name:	calibre.jpg
Views:	903
Size:	169.3 KB
ID:	127470  
rebl is offline   Reply With Quote