View Single Post
Old 06-17-2018, 06:15 PM   #12
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Well, I posted this new TTS plugin in the Plugin forum but the call to the MS SAPI speech interface appears to fail if trying to run with calibre 32-bit ... sigh ... I really should have thought to check this before deciding to share.

I don't know enough to be able to fix this, if it even is fixable so I need to be able to fail gracefully, preferably during the initial plugin install, if that's possible.

I've set supported_platforms = ['windows'] in the plugin's __init__.py but I don't see anything else obvious in there for checking whether the PC and/or calibre is 64bit. I can see is64bit in calibre.constants, but where is the best place to do the test to cause the least user inconvenience if they don't have a suitable setup?

FWIW this was the error message:
Spoiler:
Code:
calibre, version 3.26.1
ERROR: Unhandled exception: <b>com_error</b>:(-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147200967), None)

calibre 3.26.1 Portable embedded-python: True is64bit: False
Windows-10-10.0.17134-SP0 Windows ('32bit', 'WindowsPE')
32bit process running on 64bit windows
('Windows', '10', '10.0.17134')
Python 2.7.12+
Windows: ('10', '10.0.17134', 'SP0', u'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: EpubXCustomMetadata (0, 0, 2) && EpubModBuild (0, 1, 6) && EpubSplit (2, 4, 0) && KePub Metadata Reader (3, 0, 2) && Kobo Utilities (2, 6, 0) && Quality Check (1, 9, 11) && TTS to MP3 (0, 1, 0) && JS_Editor_Tools (0, 2, 5) && Count Pages (1, 8, 0) && Epub2Epub3 (0, 0, 16) && KePub Output (3, 0, 0) && KindleUnpack - The Plugin (0, 81, 5) && KePub Input (3, 0, 0) && EpubCheck (0, 1, 2) && ScrambleEbook (0, 0, 5) && Epub2Kepub (0, 0, 22) && KoboTouchExtended (3, 0, 2) && Extract ISBN (2, 0, 0) && Modify ePub (1, 3, 13) && KePub Metadata Writer (3, 0, 3)
Traceback (most recent call last):
  File "calibre_plugins.tts_to_mp3_plugin.uiaction", line 168, in show_dialog
  File "calibre_plugins.tts_to_mp3_plugin.tts_to_mp3", line 210, in __init__
  File "calibre_plugins.tts_to_mp3_plugin.tts_to_mp3", line 234, in initialise_data
  File "calibre_plugins.tts_to_mp3_plugin.other_dlgs", line 377, in get_voices_all
  File "calibre_plugins.tts_to_mp3_plugin.tts_typelib", line 2957, in GetVoices
  File "site-packages\win32com\client\__init__.py", line 459, in _ApplyTypes_
com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147200967), None)

Last edited by jackie_w; 06-17-2018 at 06:19 PM.
jackie_w is offline   Reply With Quote