View Single Post
Old 08-15-2014, 02:01 AM   #109
Valvar
Junior Member
Valvar knows the difference between 'who' and 'whom'Valvar knows the difference between 'who' and 'whom'Valvar knows the difference between 'who' and 'whom'Valvar knows the difference between 'who' and 'whom'Valvar knows the difference between 'who' and 'whom'Valvar knows the difference between 'who' and 'whom'Valvar knows the difference between 'who' and 'whom'Valvar knows the difference between 'who' and 'whom'Valvar knows the difference between 'who' and 'whom'Valvar knows the difference between 'who' and 'whom'Valvar knows the difference between 'who' and 'whom'
 
Posts: 5
Karma: 10096
Join Date: Dec 2012
Location: Sweden
Device: Kobo Aura HD
Quote:
Originally Posted by davidfor View Post
Kovid: That makes sense. All except releasing the betas as the stable distro version. As both version of PyQt are importable, reversing the imports should fix it in this environment without breaking the others. Except maybe an Arch Linux that was still running a 1.x version of calibre.

Valvar: I have attached a version that reverses the imports. Could you test it and tell us how it goes?
This version works great on 1.205! On 1.40 (I downgraded Calibre to test) it throws this:

Quote:
calibre, version 1.40.0
ERROR: Unhandled exception: <b>AttributeError</b>:'module' object has no attribute 'QCheckBox'

calibre 1.40 isfrozen: False is64bit: True
Linux-3.16.1-1-ARCH-x86_64-with-glibc2.2.5 Linux ('64bit', 'ELF')
('Linux', '3.16.1-1-ARCH', '#1 SMP PREEMPT Thu Aug 14 07:40:19 CEST 2014')
Python 2.7.8
Linux: ('', '', '')
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/actions/convert.py", line 156, in convert_ebook
self.do_convert(book_ids, bulk=bulk)
File "/usr/lib/calibre/calibre/gui2/actions/convert.py", line 173, in do_convert
self.gui.library_view.model().db, book_ids, out_format=prefs['output_format'])
File "/usr/lib/calibre/calibre/gui2/tools.py", line 41, in convert_single_ebook
d = SingleConfig(parent, db, book_id, None, out_format)
File "/usr/lib/calibre/calibre/gui2/convert/single.py", line 151, in __init__
self.setup_pipeline()
File "/usr/lib/calibre/calibre/gui2/convert/single.py", line 215, in setup_pipeline
self.plumber.get_option_help, self.db, self.book_id)
File "calibre_plugins.koboconversion.conversion.kepub_o utput", line 56, in gui_configuration_widget
File "calibre_plugins.koboconversion.conversion.config" , line 32, in __init__
File "/usr/lib/calibre/calibre/gui2/convert/__init__.py", line 55, in __init__
self.setupUi(self)
File "calibre_plugins.koboconversion.conversion.config" , line 53, in setupUi
AttributeError: 'module' object has no attribute 'QCheckBox'
Quote:
Originally Posted by jgoguen View Post
I've uploaded a new version that fixes the indentation. Not sure why my editor's PEP8 linting didn't catch that (or if I just missed it).



@Valvar: Kovid's right, you'll have all sorts of problems with calibre on Arch until the beta isn't beta anymore *and* all plugins are updated to not import from PyQ54 (or at least, to import PyQt5 first and fail back to PyQt4). I would strongly suggest that you not use any distro-provided calibre package (Arch or others), even on Linux I only tested with Kovid's packages.



Alright, fine, I feel bad not making such an easy change, try this update to the plugin and let me know if it works better with your distro package. Someone not on the beta and/or using the official package also please try and let me know if it breaks.

BTW, I do expect this to break on distro packages for non-beta users. So I do need someone on a distro package not the beta to try this as well.
This version seems to work exactly like davidfor's version. It works great under 1.205, but throws the same error under 1.40.

Thanks for the effort made to fix the plugin even after you've moved on! It's much appreciated!

(And I'm also very surprised at the beta packages being used for Arch - I haven't enabled [testing], so it must be a maintainer who is a bit crazy).
Valvar is offline   Reply With Quote