apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.47k stars 1.5k forks source link

Syntax error on loading plugin (calibre v 5.10.1) #1516

Open rafasaur opened 3 years ago

rafasaur commented 3 years ago

When trying to install DeDRM plugin, got the error SyntaxError:invalid syntax (calibre_plugins.dedrm.__init__, line 169). Obok installed just fine however.

Here is the full printout:


ERROR: Unhandled exception: <b>SyntaxError</b>:invalid syntax (calibre_plugins.dedrm.__init__, line 169)

calibre 5.10.1 [64bit]  embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 36, 0) && Package KFX (from KFX Input) (1, 36, 0) && FanFicFare (3, 29, 0) && Goodreads Sync (1, 15, 0) && KFX metadata reader (from KFX Input) (1, 36, 0) && KFX Input (1, 36, 0) && KePub Metadata Reader (3, 4, 3) && Kobo Utilities (2, 12, 3)
Traceback (most recent call last):
  File "calibre\gui2\preferences\plugins.py", line 316, in add_plugin
  File "calibre\customize\ui.py", line 472, in add_plugin
  File "calibre\customize\ui.py", line 61, in load_plugin
  File "calibre\customize\zipplugin.py", line 293, in load
  File "importlib\__init__.py", line 127, in import_module
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "calibre\customize\zipplugin.py", line 185, in exec_module
  File "calibre\customize\zipplugin.py", line 181, in get_code
  File "calibre_plugins.dedrm.__init__", line 169
    print u"{0} v{1}: Copying needed library files from plugin's zip".format(PLUGIN_NAME, PLUGIN_VERSION)
          ^
SyntaxError: invalid syntax
ElleKayEm commented 3 years ago

With calibre 5.x, you need to use beta DeDRM 7.0.3. For DeDRM 6.8.1, you need calibre 4.23.