View Single Post
Old 10-21-2012, 03:51 PM   #11
Xwang
Connoisseur
Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.
 
Posts: 77
Karma: 2136220
Join Date: Sep 2012
Device: none
Quote:
Originally Posted by JimmXinu View Post
Actually, that's not the first error I get:
Code:
calibre, version 0.9.3
ERROR: Unhandled exception: <b>SyntaxError</b>:invalid syntax (calibre_plugins.upperize_db.action, line 39)

Traceback (most recent call last):
  File "site-packages\calibre\gui2\preferences\plugins.py", line 316, in add_plugin
  File "site-packages\calibre\gui2\preferences\plugins.py", line 406, in check_for_add_to_toolbars
  File "site-packages\calibre\customize\__init__.py", line 543, in load_actual_plugin
  File "importlib\__init__.py", line 37, in import_module
  File "site-packages\calibre\customize\zipplugin.py", line 147, in load_module
  File "calibre_plugins.upperize_db.action", line 39
    def upperizedb(self)
                       ^
SyntaxError: invalid syntax
But that's a simple missing ':' on line 39. After fixing that, I get your error--from the GUI.

If you're running calibre as 'calibre-debug -g' from CLI (which I always do), you also see this error on the console:

Code:
Traceback (most recent call last):
  File "site-packages\calibre\gui2\ui.py", line 127, in __init__
  File "site-packages\calibre\gui2\ui.py", line 141, in init_iaction
  File "site-packages\calibre\customize\__init__.py", line 543, in load_actual_plugin
  File "importlib\__init__.py", line 37, in import_module
  File "site-packages\calibre\customize\zipplugin.py", line 150, in load_module
  File "calibre_plugins.upperize_db.action", line 23, in <module>
NameError: name 'InterfaceAction' is not defined
Now we know the real problem: You need to import InterfaceAction in action.py. It's commented out.
Thank you for your help!
Now the plugin works, but I've discovered that it is necessary tu upperize also the extension.
Is there any way to access to it so that to upperize it in a manner similar to the one used for titles and authors?
Xwang
Xwang is offline   Reply With Quote