View Single Post
Old 04-25-2011, 11:55 PM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,863
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by A0tmsk View Post
I just started working on a plugin for calibre using version 0.7.57 on linux and I am having trouble adding new plugins. I can add the ones I find in this forum, but that is all. Even the plugins Ive downloaded from the tutorial here do not work.
I have never done a plugin but you are right the helloworld_plugin.zip that you can download from that page will not work as is because as the error states It does not contain a top-level __init__.py file. The __init__.py file has to be in the top level of the zipped file. It can not be inside a directory within the zipped file.

Once I extracted the hello world directory and just zipped the __init__.py file up by itself, renamed the zip file helloworld_plugin.zip it added to calibre fine and it worked as advertised.

Quote:
Originally Posted by A0tmsk View Post
What makes things stranger is that I can take one of the plugins from here that works, extract it, and rezip it, and it no longer works.
When you rezip it do not zip the contents of the plugin inside another directory. I'm guessing when you view your new zip that the top level is a directory and you have to click down one level to see the plugin files.

See attached image to see what you should see inside your zip file. The __init__.py file is at the top level and it works fine. When you are rezipping it you must be putting it inside a directory.

Good Luck.
Attached Thumbnails
Click image for larger version

Name:	Qualitycheck_structure.jpg
Views:	778
Size:	76.4 KB
ID:	70510  
DoctorOhh is offline   Reply With Quote