View Single Post
Old 10-03-2020, 04:45 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,434
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That's the UTF-8 BOM. I should have the plugin loader strip that. https://github.com/kovidgoyal/calibr...51d0aa2c8622b5

Quote:
Originally Posted by davidfor View Post
Using a copy of my configuration directory, three plugins didn't load. They were Databazeknih, Overdrive Link and Embed Comic Metadata. When I tried to install Overdrive Link, I got this error:
Code:
calibre, version 5.1.1
ERROR: Install plugin failed: A problem occurred while installing this plugin. This plugin will now be uninstalled. Please post the error message in details below into the forum thread for this plugin and restart calibre.

Traceback (most recent call last):
  File "calibre\gui2\dialogs\plugin_updater.py", line 731, in _install_clicked
  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 279, 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 171, in exec_module
  File "calibre\customize\zipplugin.py", line 167, in get_code
  File "calibre_plugins.overdrive_link.__init__", line 1
    #!/usr/bin/env python
    ^
SyntaxError: invalid character in identifier
When I tried using calibre-debug, the console show a square in front of the "#" in the output. This was there for all three failing plugins. I pasted the above into the editor, and it tells me that the character is a zero-width no-break space. All three have that character at the start of the file that causes the error. That should be fixed by the plugin authors, but, it is a difference in how they are handled. But, is it actually a sign of a bug in the zipimport module?
kovidgoyal is offline   Reply With Quote