Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 05-07-2011, 06:29 PM   #91
makaza
Member
makaza began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jul 2010
Device: sony prs-505
Question Problem Installing Plug In Updater

First of all as a newbie can I say a great big thankyou to Kovid and the rest of the community for such a brilliant programme - it puts Sony's efforts to shame.

Having updated to 0.8.0 and done a restart I have tried to install the plug in updater using the instructions given for manual install (I'm using Win 7, 64 bit) but each time I try I get the following error.

calibre, version 0.8.0
ERROR: Unhandled exception: <b>InvalidPlugin</b>:The plugin in u'C:/Program Files (x86)/Calibre2/pylib.zip' is invalid. It does not contain a top-level __init__.py file

Traceback (most recent call last):
File "site-packages\calibre\gui2\preferences\plugins.py", line 283, in add_plugin
File "site-packages\calibre\customize\ui.py", line 322, in add_plugin
File "site-packages\calibre\customize\ui.py", line 54, in load_plugin
File "site-packages\calibre\customize\zipplugin.py", line 160, in load
File "site-packages\calibre\customize\zipplugin.py", line 255, in _locate_code
InvalidPlugin: The plugin in u'C:/Program Files (x86)/Calibre2/pylib.zip' is invalid. It does not contain a top-level __init__.py file



Presumably I'm doing something stupid - Has anyone got any advice?
Makaza
makaza is offline   Reply With Quote
Old 05-07-2011, 06:53 PM   #92
kiwidude
calibre/Sigil 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,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Why are you trying to load "pylib.zip" as a plugin? It should be the "Plugin Updater.zip" file that you downloaded from the first post on this thread that you should be trying to add...
kiwidude is offline   Reply With Quote
 
Enthusiast
Old 05-07-2011, 07:00 PM   #93
drMerry
Addict
drMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmos
 
drMerry's Avatar
 
Posts: 293
Karma: 21022
Join Date: Mar 2011
Location: NL
Device: Sony PRS-650
Quote:
Originally Posted by kiwidude View Post
@drMerry - it already does this. I just haven't updated the plugins index page to reflect the deprecated status for those plugins. It has only been out for a few hours...
Well, my idea was a little different.
The idea is there would be some minimal / maximal version info in the plugin-info.
Than there is a check on current calibre version.
This would save you time and give the plugin more options.

A obsolete / deprecated plugin is not always deprecated.
For example, lets say I have a plugin for 0.7 that gives the cover-download screen as it is in 0.8.
This plugin is obsolete / deprecated for 0.8 users because they have it build into the core. But if I have whatever reason to keep working with 0.7, I could still benefit from the plugin.

So I'd rather see a version comparison than a ('to manual update') deprecate function.

You get the point?
If you're fine with the way it works, it is fine by me. Just a suggestion that is more flexible in my opinion...
drMerry is offline   Reply With Quote
Old 05-07-2011, 07:17 PM   #94
kiwidude
calibre/Sigil 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,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
I'm happy with the way it works currently. There is already minimal version info - plugin updater won't let you install a plugin with a Calibre version higher than what you are running.

A plugin becoming end of life ("maximal version") is when it becomes deprecated. There will be no more support, no more versions. So a user should not have any options other than to uninstall it which is the case with Plugin Updater now. Users who have stuck to Calibre 0.7.x are still able to run the deprecated plugins, they just can't use plugin updater to install them, they must do it manually.

The point of a plugin reaching end of life and being deprecated is that it is dead as far as the developer is concerned. If it still has some sort of heartbeat/ongoing life, it wouldn't have deprecated status. I have no interest in supporting or fixing my plugins that have been deprecated. If Goodreads change their website again breaking plugins for 0.7 users - well tough luck. Upgrade to Calibre 0.8 and get a higher featured and supported version. Life is too short and I don't get paid a cent so I have no intentions of wasting any time on issues that are easily solved by users upgrading Calibre versions.

It's tough love...
kiwidude is offline   Reply With Quote
Old 05-07-2011, 07:37 PM   #95
drMerry
Addict
drMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmos
 
drMerry's Avatar
 
Posts: 293
Karma: 21022
Join Date: Mar 2011
Location: NL
Device: Sony PRS-650
clear.

I did not put the external changes (like broken goodread links) into my consideration.
I now understand that point of view and totally agree with it.
Thank you
drMerry is offline   Reply With Quote
Old 05-07-2011, 07:52 PM   #96
makaza
Member
makaza began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jul 2010
Device: sony prs-505
Quote:
Originally Posted by kiwidude View Post
Why are you trying to load "pylib.zip" as a plugin? It should be the "Plugin Updater.zip" file that you downloaded from the first post on this thread that you should be trying to add...
Kiwidude,
I did warn you I was doing something stupid!

Many thanks, its all sorted now and the other plugins install without a problem.

Thank you for your help
Regards
Makaza
makaza is offline   Reply With Quote
Old 05-07-2011, 08:03 PM   #97
kiwidude
calibre/Sigil 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,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Makaza - excellent, glad to hear you are up and running. Welcome to MobileRead btw.
kiwidude is offline   Reply With Quote
Old 05-08-2011, 10:09 PM   #98
zhw007
Junior Member
zhw007 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2011
Device: Kindle DXG
@kiwidude - Thanks for your reply.
zhw007 is offline   Reply With Quote
Old 05-15-2011, 11:20 AM   #99
kiwidude
calibre/Sigil 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,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
v1.2 Released

Changes in this release:
  • Check for plugin updates in the background at startup and every 4 hours, update icon if available
  • Add support for donation hyperlink to plugin developers in Plugin Index page
  • Handle invalid name/value pairs from imperfect editing of the forum index page

A little more detail on the two key points of this release. The first being that the plugin will now check periodically and at Calibre startup to see whether there are any updates available for the plugins that you have installed. If there are, you will see the icon change to have a red exclamation mark in the corner, and the text name change to have a * after it (for those of you who use menu bars or no icons).

The second change is a column in the GUI dialog in combination with a hyperlink on the plugin forum index page allowing users to make PayPal donations to the individual plugin developer. If any of the other plugin developers also want to encourage such donations for their plugins, just send me an "email link" for your PayPal donation page and I will update the forum index.

The donations stuff has all been discussed with Kovid - obviously it is not my intent or desire to significantly impact his own Calibre income. However speaking for myself having spent several thousand hours doing Calibre development/support over the last six months for nothing more than giggles the time committed has gotten rather out of proportion.

I know there are other plugin developers out there who also have spent serious amounts of time supporting their plugins. So if someone wants to donate a few extra dollars every now and then to keep that developer encouraged to continue then we would be very grateful.
kiwidude is offline   Reply With Quote
Old 05-22-2011, 04:01 PM   #100
SoulStyle
Enthusiast
SoulStyle began at the beginning.
 
Posts: 26
Karma: 22
Join Date: May 2011
Device: Kindle 3
Dear kiwidude,

I tried the last two versions of your updater plugin and it will always give me the error message
Code:
calibre, version 0.8.2
ERROR: Update Check Failed: Unable to reach the MobileRead plugins forum index page.

http://www.mobileread.com/forums/showpost.php?p=1362767&postcount=1
Downloading meta-data generally works fine with Calibre and directly pasting the above mentioned link in the browser also works. No proxy or other fancy stuff used.
Any idea what could be wrong?

Thanks and BR,

SoulStyle
SoulStyle is offline   Reply With Quote
Old 05-22-2011, 04:10 PM   #101
kiwidude
calibre/Sigil 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,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Any idea? Ummm... not really. Have you tried restarting your router? What about when you run calibre in debug mode - is there any more output than what you posted above?

The plugin just uses the same browser object that downloading metadata and all my other plugins (now) use. Do plugins like Search the Internet work for you?
kiwidude is offline   Reply With Quote
Old 05-22-2011, 04:12 PM   #102
bookfanmd
Addict
bookfanmd has a spectacular aura aboutbookfanmd has a spectacular aura aboutbookfanmd has a spectacular aura aboutbookfanmd has a spectacular aura aboutbookfanmd has a spectacular aura aboutbookfanmd has a spectacular aura aboutbookfanmd has a spectacular aura aboutbookfanmd has a spectacular aura aboutbookfanmd has a spectacular aura aboutbookfanmd has a spectacular aura aboutbookfanmd has a spectacular aura about
 
bookfanmd's Avatar
 
Posts: 244
Karma: 4476
Join Date: May 2009
Location: US - Maryland
Device: Sony 300/505/T1 Nook STWG Kobo Glo Kobo Aura HD KDX iPad1 K3 KT PW2
deleted

Last edited by bookfanmd; 05-22-2011 at 04:27 PM. Reason: disregard
bookfanmd is offline   Reply With Quote
Old 05-22-2011, 04:23 PM   #103
SoulStyle
Enthusiast
SoulStyle began at the beginning.
 
Posts: 26
Karma: 22
Join Date: May 2011
Device: Kindle 3
Quote:
Originally Posted by kiwidude View Post
Any idea? Ummm... not really. Have you tried restarting your router? What about when you run calibre in debug mode - is there any more output than what you posted above?

The plugin just uses the same browser object that downloading metadata and all my other plugins (now) use. Do plugins like Search the Internet work for you?
I ran calibre with "calibre-debug -g" but no (more) output is produced.
The "Search the Internet" works fine and, e.g. your Goodreads Metadata Source plugin does a perfect job as well.
SoulStyle is offline   Reply With Quote
Old 05-25-2011, 04:48 PM   #104
SoulStyle
Enthusiast
SoulStyle began at the beginning.
 
Posts: 26
Karma: 22
Join Date: May 2011
Device: Kindle 3
With my very limited coding knowledge I fooled around in the code and added some debug statements to the read_available_plugins() function:

Code:
def read_available_plugins():
    display_plugins = []
    br = browser()
	br.set_debug_http(True)
	br.set_debug_redirects(True)
	br.set_debug_responses(True)
    try:
        raw = br.open_novisit(MR_INDEX_URL).read()
		prints('============ RAW ==========')
		prints(raw)
        if not raw:
            return
    except:
        traceback.print_exc()
        return
    raw = raw.decode('utf-8', errors='replace')
	prints('============ RAW UTF8 ==========')
	prints(raw)
    root = html.fromstring(raw)
	prints('============= ROOT ============')
	prints(root)
    list_nodes = root.xpath('//div[@id="post_message_1362767"]/ul/li')
This is the output of the debug statements:

Debug browser object:
Quote:
Restarting with: C:\Program Files (x86)\Calibre2\calibre-debug.exe ['calibre-deb
ug.exe', u'-g']
Starting up...
Started up in 1.37699985504
send: u'GET /forums/showpost.php?p=1362767&postcount=1 HTTP/1.1\r\nAccept-Encodi
ng: identity\r\nHost: www.mobileread.com\r\nConnection: close\r\nUser-Agent: Moz
illa/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101210 Gentoo Firefo
x/3.6.13\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Connection: close
header: Set-Cookie: bblastvisit=1306351703; expires=Thu, 24-May-2012 19:28:23 GM
T; path=/; domain=.mobileread.com
header: Set-Cookie: bblastactivity=0; expires=Thu, 24-May-2012 19:28:23 GMT; pat
h=/; domain=.mobileread.com
header: Expires: 0
header: Cache-Control: private, post-check=0, pre-check=0, max-age=0
header: Pragma: no-cache
header: Content-Type: text/html; charset=ISO-8859-1
header: X-UA-Compatible: IE=7
header: Content-Encoding: gzip
header: Content-Length: 7691
header: Date: Wed, 25 May 2011 19:28:23 GMT
header: Server: Apache
send: u'GET /forums/showpost.php?p=1362767&postcount=1 HTTP/1.1\r\nAccept-Encodi
ng: identity\r\nHost: www.mobileread.com\r\nConnection: close\r\nUser-Agent: Moz
illa/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101210 Gentoo Firefo
x/3.6.13\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Connection: close
header: Set-Cookie: bblastvisit=1306351704; expires=Thu, 24-May-2012 19:28:24 GM
T; path=/; domain=.mobileread.com
header: Set-Cookie: bblastactivity=0; expires=Thu, 24-May-2012 19:28:24 GMT; pat
h=/; domain=.mobileread.com
header: Expires: 0
header: Cache-Control: private, post-check=0, pre-check=0, max-age=0
header: Pragma: no-cache
header: Content-Type: text/html; charset=ISO-8859-1
header: X-UA-Compatible: IE=7
header: Content-Encoding: gzip
header: Content-Length: 7691
header: Date: Wed, 25 May 2011 19:28:24 GMT
header: Server: Apache
send: u'GET /forums/showpost.php?p=1362767&postcount=1 HTTP/1.1\r\nAccept-Encodi
ng: identity\r\nHost: www.mobileread.com\r\nConnection: close\r\nUser-Agent: Moz
illa/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101210 Gentoo Firefo
x/3.6.13\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Connection: close
header: Set-Cookie: bblastvisit=1306351705; expires=Thu, 24-May-2012 19:28:25 GM
T; path=/; domain=.mobileread.com
header: Set-Cookie: bblastactivity=0; expires=Thu, 24-May-2012 19:28:25 GMT; pat
h=/; domain=.mobileread.com
header: Expires: 0
header: Cache-Control: private, post-check=0, pre-check=0, max-age=0
header: Pragma: no-cache
header: Content-Type: text/html; charset=ISO-8859-1
header: X-UA-Compatible: IE=7
header: Content-Encoding: gzip
header: Content-Length: 7691
header: Date: Wed, 25 May 2011 19:28:25 GMT
header: Server: Apache
raw output (only the first few lines):
Quote:
============ RAW ==========
 ]{SH;[ߡGSw b۞%@&L&EVV%gkݲd025UN =qޯ>
#1LG8@X8pËCۋQ"vO(t 9zo kǹovsƪ
JZxRjo{<ւqjuKx~ܲ4D%C5t=h$S Ok_(LeV.&cie6u
h]q"qCek]YXfɖu%'7Q%1Ns̼&d7_g@8
*d8; Ӭ6gspz\.gv[1yv'e&&^a
nx(U3wL;9?~>ƺ_}yCw%5E]tpx~PЬɤc"ŅeeqO
\TA#:$PTT*D ])HPS^/I?8Yya^4{9dꇗx*lT
jmӦ^4] `Ay%b~m̫V)Mu՜ٳp״oLq/Z"{̷'0ܱ
raw utf8 (only the first few lines)
Quote:
============ RAW UTF8 ==========
 ��]{S�H��;[�ߡGSw �b��۞%@&���L&��E�V
V�%��gk�����ݲd025U��N =�qޯ>��������#
1LG�8�����@X���8p�ËC��ۋ �Q���"v��O�(t
9zo k���ǹ���ov��s�ƪ��� JZx��R�j��o
{<���ւqj����uKx~ܲ�4�D��� %C5�t=h$S�O��k�_
��(Le�V.&ci����e��6uh�]��q"��q�Cek��]�Y
�Xf��ɖu%'7Q�%�1N���s̼&d7� ���_�g��@��8
root output
Quote:
============= ROOT ============
<Element p at 0x5b63450>

Provided that the "prints" statement is not totally wrong for outputting this kind of content it seems that the http connection is all fine and then things starts to get messy.
Hope you can make more out of it. If you provide the instructions I will gladly add some more debug output to trace this.

Best regards,

SoulStyle
SoulStyle is offline   Reply With Quote
Old 05-25-2011, 05:08 PM   #105
kiwidude
calibre/Sigil 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,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@SoulStyle - looks like the output coming from the Browser object is completely kakked - it should be human readable html, not that mess of randomness. I don't know what to suggest, other than completely uninstalling and reinstalling Calibre.
kiwidude is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Generate Cover kiwidude Plugins 482 Yesterday 10:09 AM
[GUI Plugin] Goodreads Sync kiwidude Plugins 654 Yesterday 09:35 AM
[GUI Plugin] Open With kiwidude Plugins 228 Yesterday 01:06 AM
[GUI Plugin] Clipboard Search kiwidude Plugins 4 09-11-2011 06:14 AM
[GUI Plugin] Book Sync **Deprecated** kiwidude Plugins 111 06-07-2011 07:47 PM


All times are GMT -4. The time now is 06:05 AM.


MobileRead.com is a privately owned, operated and funded community.