View Single Post
Old 03-25-2011, 10:00 PM   #9
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Thanks for posting those. I did a binary diff on the zip file and it is identical to the one from my first post, so that confirms that nothing has tampered with it in the downloading process.

In terms of older versions available, no there isn't. All the versions since my significant rewrite of it have the same loading mechanism with multiple codefiles in the zip file, so an older version will make no difference. Nor will you be able to get virtually any of my other plugins here to work until you get this resolved.

Kovid has given me a suggestion for an alternate way to startup the plugin, involving it unzipping to a temporary directory while it runs and Calibre cleaning up afterwards. That is kind of a last resort brute force option though.

I've just taken a look at some Python source code for zipimport. It seems that particular error is thrown when there is an issue with how it slices up the path to the zip file. If indeed the code I am looking at is correct this might give us some clues. I am attaching a special build just for you with some additional debug statements to print out the plugin path information it is being given. Depending on what we see from that, I may give you another build or a separate test script to find out exactly what the failure is.

So download the attachment, try to install it while using calibre-debug -g, and let me know the output again.

EDIT: This is the source code I was looking at - perhaps Kovid or someone could tell me if this is indeed what would be called by Calibre as a result of "import zipimport".
http://svn.red-bean.com/bob/pyegg/tr...pyzipimport.py
As you can see from the code there is only one specific place this error is thrown from so it does look path related?
Attached Files
File Type: zip search_the_internet_plugin.zip (75.4 KB, 437 views)

Last edited by kiwidude; 03-25-2011 at 10:17 PM.
kiwidude is offline   Reply With Quote