Bibliophagist
Posts: 46,445
Karma: 169098492
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Originally Posted by davidfor
I have done some playing, and the problem appears to be with importing from "calibre.ebooks.oeb.polish.container". If this is done when the plugin is loaded, it will fail. If it is done later, it works. I have no idea why. I assume it is related to the thread-safe issues with importing in Windows, but, I am not sure. Or, it might just be that what we were doing was wrong.
The attached beta is a quick-and-dirty hack to move the import to when it is actually needed. I have not done much testing, but it seems to work for the few books I have tried.
If this works for others, I'll look at the other kepub plugins as well.
|
Sorry but for me, the install errors out either running the binaries or running from source. BTW, was the run.cmd supposed to be in the .zip file?
Code:
calibre, version 5.1.0
ERROR: Unhandled exception: <b>ImportError</b>:cannot import name 'KOBOTOUCHEXTENDED' from 'calibre_plugins.kobotouch_extended.device.driver' (<calibre Plugin Loader>)
calibre 5.1* [64bit] embedded-python: True is64bit: True
Windows-10-10.0.19041-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', 'SP0', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (7, 0, 0) && Annotations (1, 12, 0) && Baen (1, 2, 0) && Calibre Power Search Plugin (1, 6, 0) && Count Pages (1, 10, 0) && Diaps Editing Toolbag (0, 3, 6) && EpubCheck (0, 2, 3) && EpubMerge (2, 11, 0) && EpubSplit (2, 9, 0) && FanFicFare (3, 23, 0) && Fantastic Fiction (1, 4, 0) && Find Duplicates (1, 7, 5) && Goodreads (1, 5, 1) && Hyphenate This! (0, 1, 3) && Job Spy (1, 0, 184) && Kindle hi-res covers (0, 5, 0) && KindleUnpack - The Plugin (0, 82, 3) && Kobo Books (1, 8, 0) && Kobo Utilities (2, 11, 5) && Modify ePub (1, 6, 0) && Obok DeDRM (6, 7, 0) && Open With (1, 5, 12) && Quality Check (1, 10, 1) && Resize Cover (1, 1, 0) && ScrambleEbook (0, 4, 5) && SmartEject (2, 3, 0) && Smashwords Metadata (1, 0, 2)
Traceback (most recent call last):
File "C:\Users\David\work\calibre\src\calibre\gui2\preferences\plugins.py", line 317, in add_plugin
File "C:\Users\David\work\calibre\src\calibre\customize\ui.py", line 472, in add_plugin
File "C:\Users\David\work\calibre\src\calibre\customize\ui.py", line 61, in load_plugin
File "C:\Users\David\work\calibre\src\calibre\customize\zipplugin.py", line 200, in load
File "C:\Users\David\work\calibre\src\polyglot\builtins.py", line 123, in reload
File "importlib\__init__.py", line 169, in reload
File "<frozen importlib._bootstrap>", line 602, in _exec
File "C:\Users\David\work\calibre\src\calibre\customize\zipplugin.py", line 184, in load_module
File "calibre_plugins.kobotouch_extended.__init__", line 9, in <module>
ImportError: cannot import name 'KOBOTOUCHEXTENDED' from 'calibre_plugins.kobotouch_extended.device.driver' (<calibre Plugin Loader>)
|