05-15-2011, 12:57 PM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: May 2011
Device: kindle3
|
Can't add plugins (Calibre 8.1 on Arch Linux)
Hi, I've been struggling to add plugins to Calibre for a while now. I have read the directions and followed them explicitly yet when I navigate to the folder that contains the zipped plugins, nothing appears. The plugins are unaltered, zipped as distributed, and I have tried multiple different plugins so I think its an issue with my install.
I have tried calibre-debug -g which outputs no errors whatsoever, I have opened the plugins to verify that __Init__.py and the required txt file are there and intact. I've verified that python2 import zipimport works as it should... I'm at my wits end here. I have found no errors whatsoever but the plugins still refuse to display. Any help would be greatly appreciated. Thanks! |
05-15-2011, 01:00 PM | #2 |
creator of calibre
Posts: 43,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
In the dialog your are using to browse to the plugin try changing the filter to all files in the bottom of the dialog.
|
Advert | |
|
05-15-2011, 01:04 PM | #3 |
Junior Member
Posts: 3
Karma: 10
Join Date: May 2011
Device: kindle3
|
I thought to try the same thing but strangely the only filter is Plugins. There is no option to change it to all files.
|
05-15-2011, 01:21 PM | #4 |
creator of calibre
Posts: 43,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
What desktop are you using?
You can add a plugin by doing calibre-customize -a /path/to/plugin.zip on the command line. |
05-15-2011, 01:45 PM | #5 |
Junior Member
Posts: 3
Karma: 10
Join Date: May 2011
Device: kindle3
|
I am using xfce4 with thunar as the desktop/file manager. Using calibre-customize worked like a charm though, thanks!
Let me know what other information I can provide as I'd love to get this working through the gui. |
Advert | |
|
05-15-2011, 01:47 PM | #6 |
calibre/Sigil Developer
Posts: 4,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
If you install the plugin updater plugin (using calibre-customize) that would circumvent this issue for you - as plugins are chosen via a Calibre gui rather than from the file manager.
|
05-15-2011, 02:25 PM | #7 |
creator of calibre
Posts: 43,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Not much I can do about that, calibre just uses a standard Qt function to open a file chooser dialog. You would have to get Qt to fix whatever the issue with xfce's native file chooser is.
|
07-10-2011, 08:44 AM | #8 |
Junior Member
Posts: 1
Karma: 10
Join Date: Jul 2011
Device: Android Nexus One Phone
|
It's not only in Thunar. I'm running version 0.7.44 in Ubuntu 11.04, and have the same problem... exactly, with the gnome file manager, nautilus. Will also need to install these plugins from the command line. Think there's something more than just QT going on here. Thanks.
|
12-25-2011, 09:57 PM | #9 | |
Junior Member
Posts: 3
Karma: 10
Join Date: Dec 2011
Device: Kindle 4 NT
|
Hey,
I'm experiencing the same problem. There's no chance to choose the plugin Zip-files with the Calibre-GUI. They're just not shown. In my case: Archlinux, GNOME3 (with Nautilus file-manager)... Anyway, thanks for letting us know the alternative commandline way to add plugins... You can skip this next part, which is just showing two different workarounds ===== After playing around a little bit with the python-scripts usr/lib/calibre/gui2/dialogs/plugins.py (that's the part of Calibre calling the File Chooser), I found a workaround (actually two ): 1) Change "all_files=False" (line 276) to "all_files=True" - and you'll at least have the possibility to choose "all files" in the file-chooser-dialog and select the "*.zip"-files. Of course, that isn't the nicest workaround. 2) I don't think that this is true: Quote:
Code:
path = choose_files(self, 'add a plugin dialog', _('Add plugin'), filters=[(_('Plugins') + ' (*.zip)', ['.zip'])], all_files=True, select_only_single_file=True) Code:
from PyQt4.Qt import QFileDialog path = QFileDialog.getOpenFileName(self, 'add a plugin dialog', _('Add plugin'), (_('Plugins') + ' (*.zip)')); Therefore, I think that there seems to be a bug somewhere in the Calibre code, but not in the Qt function... However, my programming skills are yet to limited to find the real source of the problem here you can go on reading ===== Allright, I think I found the "ultimate" solution now. The error definitely seems to be in the code in lines 275-277 (I noticed it when comparing that code witht the one from the "add single books"-dialog, which also has an option to only add archives): Just change this code: Code:
path = choose_files(self, 'add a plugin dialog', _('Add plugin'), filters=[(_('Plugins') + ' (*.zip)', ['.zip'])], all_files=True, select_only_single_file=True) Code:
path = choose_files(self, 'add a plugin dialog', _('Add plugin'), filters=[(_('Plugins'), ['.zip'])], all_files=False, select_only_single_file=True) Regards, katze_sonne Last edited by katze_sonne; 12-25-2011 at 09:59 PM. |
|
12-25-2011, 10:56 PM | #10 |
creator of calibre
Posts: 43,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Your change is not a "correct" fix. What it does is not show the extension being added. The dialog is supposed to show the extension being added, and it works on Windows, OS X, KDE. Furthermore it is the correct was to use QFileDialog as per the official Qt documentation: http://developer.qt.nokia.com/doc/qt...iledialog.html
Only some GNOME themes have problems with it, the fix needs to happen in them. Not showing the extensions reduces usability of the dialog. |
12-26-2011, 06:11 AM | #11 | |||
Junior Member
Posts: 3
Karma: 10
Join Date: Dec 2011
Device: Kindle 4 NT
|
Hi,
thanks for your answer! Quote:
The "choose_files"-function is imported from the /gui2/__init__.py-script, I Think (line 615). There the Class FileDialog is used. It is defined in lines 528 and following. Actually I am not really sure about what this code: Code:
extensions = ['*'+(i if i.startswith('.') else '.'+i) for i in extensions] ftext += '%s (%s);;'%(text, ' '.join(extensions)) Quote:
Quote:
katze_sonne |
|||
12-26-2011, 11:04 AM | #12 | ||
creator of calibre
Posts: 43,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
Quote:
|
||
12-27-2011, 12:47 AM | #13 |
creator of calibre
Posts: 43,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I had a brainwave Code committed that should fix this, while still preserving usability.
|
12-30-2011, 06:18 AM | #14 | ||
Junior Member
Posts: 3
Karma: 10
Join Date: Dec 2011
Device: Kindle 4 NT
|
Quote:
...however, it's great to hear that the bug was fixed now after such a short time I've seen that there's an update for Calibre already and I'll install / try it as soon as it's available in the Archlinux repositories. Oh, just seen that: Quote:
Thanks again, katze_sonne EDIT: I've just donated some money (not specifically for the bugfix, but for Calibre itself). Last edited by katze_sonne; 12-30-2011 at 10:33 AM. |
||
02-21-2012, 05:12 AM | #15 |
Junior Member
Posts: 4
Karma: 10
Join Date: Oct 2011
Device: Kindle3
|
I tried to install a plugin with the dialog and it didn't work. Still the same problem. The zip files aren't shown in the dialog box. Ubuntu 11.4, Calibre 0.8.8. I m going to try the workaround now.
Uli |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Best Calibre plugins/tweaks | baronrus | Kobo Reader | 2 | 05-24-2011 11:09 PM |
Calibre und Kindle-Plugins | hamlok | Amazon Kindle | 13 | 05-01-2011 04:14 AM |
Calibre 0.7.32 - Plugins not working after installation? | hakan42 | Plugins | 2 | 12-05-2010 02:24 PM |
sigil Arch Linux | wetterau | Sigil | 5 | 12-02-2010 12:59 PM |
Installing Calibre in Arch Linux | jatz | Calibre | 0 | 03-23-2010 01:41 PM |