View Single Post
Old 10-31-2019, 07:03 AM   #1
kylecarroll
Junior Member
kylecarroll began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Oct 2019
Device: Kindle
Plugins Failing to Import

So, I'm working on developing a plugin, and for some reason it won't import ANY zip files that I create. It's telling me that there is no top-level __init__.py file when there most definitely is. It imports fine if I download the interface_demo_plugin.zip file from Calibre webpage, which I used to test the manual import, but if I decompress it, and then recompress the exact same thing, it refuses to import.

I thought perhaps it was my compression settings, but I'm using the default "compress files" action. I've also tried 2 other compression applications, and even tried an entirely different operating system, and yet nothing will import.

Any ideas?

Code:
calibre, version 4.2.0
ERROR: Unhandled exception: <b>InvalidPlugin</b>:The plugin in u'/Users/kylecarroll/Desktop/interface_demo_plugin.zip' is invalid. It does not contain a top-level __init__.py file

calibre 4.2  embedded-python: True is64bit: True
Darwin-19.0.0-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '19.0.0', 'Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019; root:xnu-6153.11.26~2/RELEASE_X86_64')
Python 2.7.16
OSX: ('10.15', ('', '', ''), 'x86_64')
Interface language: None
Successfully initialized third party plugins: DeDRM (6, 5, 3) && Goodreads (1, 4, 0) && Goodreads Sync (1, 12, 1)
Traceback (most recent call last):
  File "site-packages/calibre/gui2/preferences/plugins.py", line 319, in add_plugin
  File "site-packages/calibre/customize/ui.py", line 472, in add_plugin
  File "site-packages/calibre/customize/ui.py", line 61, in load_plugin
  File "site-packages/calibre/customize/zipplugin.py", line 194, in load
  File "site-packages/calibre/customize/zipplugin.py", line 292, in _locate_code
InvalidPlugin: The plugin in u'/Users/kylecarroll/Desktop/interface_demo_plugin.zip' is invalid. It does not contain a top-level __init__.py file
kylecarroll is offline   Reply With Quote