Quote:
Originally Posted by kovidgoyal
from calibre.gui2.ui import get_gui
db = get_gui().current_db.new_api
|
I put these inside the "identify" method of the plugin, and when I call it (using the download metadata button in the GUI) I get:
Code:
Traceback (most recent call last):
File "site-packages/calibre/ebooks/metadata/sources/identify.py", line 44, in run
File "calibre_plugins.dummy1.__init__", line 53, in identify
AttributeError: 'NoneType' object has no attribute 'current_db'
and of course "get_gui()" returns "None".