Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#43934 - [calibre] UI is broken.

Attached to Project: Community Packages
Opened by Daniel Fort (naquad) - Tuesday, 24 February 2015, 19:58 GMT
Last edited by Jelle van der Waa (jelly) - Sunday, 08 March 2015, 20:21 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jelle van der Waa (jelly)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:

Calibre is not functioning properly. Looks like depency issue.

Additional info:
* package version(s): 2.20.0-1
* errors from console output:

QWidget::setMaximumSize: (/JobError) Negative sizes (16777215,-492131573) are not possible
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/ui.py", line 150, in __init__
ac = self.init_iaction(action)
File "/usr/lib/calibre/calibre/gui2/ui.py", line 164, in init_iaction
ac = action.load_actual_plugin(self)
File "/usr/lib/calibre/calibre/customize/__init__.py", line 582, in load_actual_plugin
ac = getattr(importlib.import_module(mod), cls)(gui,
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 179, in load_module
exec compiled in mod.__dict__
File "calibre_plugins.generate_cover.action", line 15, in <module>
File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 179, in load_module
exec compiled in mod.__dict__
File "calibre_plugins.generate_cover.config", line 12, in <module>
File "/usr/lib/calibre/calibre/startup.py", line 36, in load_module
raise ImportError('Importing PyQt4 is not allowed as calibre uses PyQt5')
ImportError: Importing PyQt4 is not allowed as calibre uses PyQt5
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/ui.py", line 150, in __init__
ac = self.init_iaction(action)
File "/usr/lib/calibre/calibre/gui2/ui.py", line 164, in init_iaction
ac = action.load_actual_plugin(self)
File "/usr/lib/calibre/calibre/customize/__init__.py", line 582, in load_actual_plugin
ac = getattr(importlib.import_module(mod), cls)(gui,
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 179, in load_module
exec compiled in mod.__dict__
File "calibre_plugins.open_with.action", line 13, in <module>
File "/usr/lib/calibre/calibre/startup.py", line 36, in load_module
raise ImportError('Importing PyQt4 is not allowed as calibre uses PyQt5')
ImportError: Importing PyQt4 is not allowed as calibre uses PyQt5
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/ui.py", line 150, in __init__
ac = self.init_iaction(action)
File "/usr/lib/calibre/calibre/gui2/ui.py", line 164, in init_iaction
ac = action.load_actual_plugin(self)
File "/usr/lib/calibre/calibre/customize/__init__.py", line 582, in load_actual_plugin
ac = getattr(importlib.import_module(mod), cls)(gui,
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 179, in load_module
exec compiled in mod.__dict__
File "calibre_plugins.quality_check.action", line 12, in <module>
File "/usr/lib/calibre/calibre/startup.py", line 36, in load_module
raise ImportError('Importing PyQt4 is not allowed as calibre uses PyQt5')
ImportError: Importing PyQt4 is not allowed as calibre uses PyQt5
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/ui.py", line 150, in __init__
ac = self.init_iaction(action)
File "/usr/lib/calibre/calibre/gui2/ui.py", line 164, in init_iaction
ac = action.load_actual_plugin(self)
File "/usr/lib/calibre/calibre/customize/__init__.py", line 582, in load_actual_plugin
ac = getattr(importlib.import_module(mod), cls)(gui,
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 179, in load_module
exec compiled in mod.__dict__
File "calibre_plugins.reading_list.action", line 14, in <module>
File "/usr/lib/calibre/calibre/startup.py", line 36, in load_module
raise ImportError('Importing PyQt4 is not allowed as calibre uses PyQt5')
ImportError: Importing PyQt4 is not allowed as calibre uses PyQt5
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/ui.py", line 150, in __init__
ac = self.init_iaction(action)
File "/usr/lib/calibre/calibre/gui2/ui.py", line 164, in init_iaction
ac = action.load_actual_plugin(self)
File "/usr/lib/calibre/calibre/customize/__init__.py", line 582, in load_actual_plugin
ac = getattr(importlib.import_module(mod), cls)(gui,
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 179, in load_module
exec compiled in mod.__dict__
File "calibre_plugins.find_duplicates.action", line 11, in <module>
File "/usr/lib/calibre/calibre/startup.py", line 36, in load_module
raise ImportError('Importing PyQt4 is not allowed as calibre uses PyQt5')
ImportError: Importing PyQt4 is not allowed as calibre uses PyQt5
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/ui.py", line 150, in __init__
ac = self.init_iaction(action)
File "/usr/lib/calibre/calibre/gui2/ui.py", line 164, in init_iaction
ac = action.load_actual_plugin(self)
File "/usr/lib/calibre/calibre/customize/__init__.py", line 582, in load_actual_plugin
ac = getattr(importlib.import_module(mod), cls)(gui,
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 179, in load_module
exec compiled in mod.__dict__
File "calibre_plugins.savetoformat.savetoformataction", line 3, in <module>
File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 179, in load_module
exec compiled in mod.__dict__
File "calibre_plugins.savetoformat.gui.prompt", line 5, in <module>
ImportError: cannot import name NONE
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/ui.py", line 150, in __init__
ac = self.init_iaction(action)
File "/usr/lib/calibre/calibre/gui2/ui.py", line 164, in init_iaction
ac = action.load_actual_plugin(self)
File "/usr/lib/calibre/calibre/customize/__init__.py", line 582, in load_actual_plugin
ac = getattr(importlib.import_module(mod), cls)(gui,
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 179, in load_module
exec compiled in mod.__dict__
File "calibre_plugins.extract_isbn.action", line 16, in <module>
File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 179, in load_module
exec compiled in mod.__dict__
File "calibre_plugins.extract_isbn.config", line 11, in <module>
File "/usr/lib/calibre/calibre/startup.py", line 36, in load_module
raise ImportError('Importing PyQt4 is not allowed as calibre uses PyQt5')
ImportError: Importing PyQt4 is not allowed as calibre uses PyQt5
Unable to open ~/.mtpz-data for reading, MTPZ disabled.
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::setFont: Painter not active
QPainter::setPen: Painter not active
QPainter::save: Painter not active
QPainter::setFont: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::setFont: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::setFont: Painter not active
QPainter::setPen: Painter not active
QPainter::save: Painter not active
QPainter::setFont: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::setFont: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::end: Painter not active, aborted

Steps to reproduce: start latest Calibre.
This task depends upon

Closed by  Jelle van der Waa (jelly)
Sunday, 08 March 2015, 20:21 GMT
Reason for closing:  Fixed
Additional comments about closing:  fixed in 2.20.0-2.
Comment by Doug Newgard (Scimmia) - Tuesday, 24 February 2015, 20:35 GMT
Works fine here. Maybe run calibre-debug -g?
Comment by Daniel Fort (naquad) - Tuesday, 24 February 2015, 20:38 GMT
It starts, but same as with usual version I don't see the interface: http://i.imgur.com/e8kaqfr.png
And the same error messages.
Comment by Doug Newgard (Scimmia) - Tuesday, 24 February 2015, 20:57 GMT
All of those PyQT4 errors are suspicious, but they may be nothing (python2-pyqt5 is already a dep). What do you get before the traceback when running calibre-debug -g?
Comment by Daniel Fort (naquad) - Tuesday, 24 February 2015, 21:21 GMT
calibre 2.20 isfrozen: False is64bit: True
Linux-3.18.6-1-ARCH-x86_64-with-glibc2.2.5 Linux ('64bit', 'ELF')
('Linux', '3.18.6-1-ARCH', '#1 SMP PREEMPT Sat Feb 7 08:44:05 CET 2015')
Python 2.7.9
Linux: ('', '', '')
Successfully initialized third party plugins: Webscription && Beam Ebooks && Generate Cover && Open With && Quality Check && Skoob && Fantastic Fiction && Reading List && Barnes & Noble && Find Duplicates && Save To Format && Databazeknih && catawiki && ANOBII && FictionDB && Extract ISBN && Goodreads
Starting up...
Comment by Daniel Fort (naquad) - Tuesday, 24 February 2015, 21:27 GMT
With --ignore-plugins those error messages are not showing up, but I still can't see the book list :(
Comment by Doug Newgard (Scimmia) - Tuesday, 24 February 2015, 21:33 GMT
I see Skoob in your plugin list, last I knew that hadn't been ported and wasn't compatible with calibre 2.0+:
http://plugins.calibre-ebook.com/porting.html

So the errors are probably from that.

Edit: catawiki is also on the list that hasn't been ported.
Comment by Daniel Fort (naquad) - Tuesday, 24 February 2015, 21:35 GMT
Even when errors are gone I don't see the book list. While books are there (calibredb and COPS are showing them) and calibre itself shows stats in the bottom left corner.

Update: I think thats the primary issue:

QWidget::setMinimumSize: (/Preferences) Negative sizes (-492131429,-492131555) are not possible
QWidget::setMinimumSize: (/Preferences) Negative sizes (-492131429,-492131555) are not possible
QWidget::setMinimumSize: (/Preferences) Negative sizes (-492131429,-492131555) are not possible
Comment by Doug Newgard (Scimmia) - Tuesday, 24 February 2015, 21:38 GMT
Get rid of the bad plugins then run calibre-debug -g again, see if anything new shows up.
Comment by Daniel Fort (naquad) - Tuesday, 24 February 2015, 21:44 GMT
Problem stays. Output:

calibre 2.20 isfrozen: False is64bit: True
Linux-3.18.6-1-ARCH-x86_64-with-glibc2.2.5 Linux ('64bit', 'ELF')
('Linux', '3.18.6-1-ARCH', '#1 SMP PREEMPT Sat Feb 7 08:44:05 CET 2015')
Python 2.7.9
Linux: ('', '', '')
Successfully initialized third party plugins:
Starting up...
QWidget::setMaximumSize: (/JobError) Negative sizes (16777215,-492131573) are not possible
Unable to open ~/.mtpz-data for reading, MTPZ disabled.
Started up in 1.78 seconds with 510 books
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::setFont: Painter not active
QPainter::setPen: Painter not active
QPainter::save: Painter not active
QPainter::setFont: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::setFont: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::setFont: Painter not active
QPainter::setPen: Painter not active
QPainter::save: Painter not active
QPainter::setFont: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::setFont: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::end: Painter not active, aborted
Comment by Doug Newgard (Scimmia) - Tuesday, 24 February 2015, 21:47 GMT
What version of Qt5?
Comment by Daniel Fort (naquad) - Tuesday, 24 February 2015, 21:47 GMT
5.4.0-2
Comment by Doug Newgard (Scimmia) - Tuesday, 24 February 2015, 21:51 GMT
-2? I noticed your kernel was a bit old and figured you just held it back or something, but your qt5 package is a bit old, too. The only way you could have calibre 2.20 is if you did a partial update.

Update your entire system and see if it works.

Edit: sorry, kernel is correct, it was just my -ck kernel that updated. Still, no way should you have qt5 5.4.0-2 with calibre 2.20, so my point stands.
Comment by Daniel Fort (naquad) - Tuesday, 24 February 2015, 21:54 GMT
https://www.archlinux.org/packages/?q=python2-pyqt5 my pyqt5 is up to date. there's no newer version of this package from what I see in package search.
Comment by Doug Newgard (Scimmia) - Tuesday, 24 February 2015, 21:56 GMT
Ah, I see the confusion, I wasn't asking about pyqt5, but about qt5 itself.
Comment by Daniel Fort (naquad) - Tuesday, 24 February 2015, 21:58 GMT
qt5-base is 5.4.0-3. My system is up to date, after seeing that issue I've made a complete update.
Comment by Doug Newgard (Scimmia) - Tuesday, 24 February 2015, 22:01 GMT
Maybe try a different WM? Could be something there reporting a bad size.
Comment by Daniel Fort (naquad) - Saturday, 28 February 2015, 21:35 GMT
Sorry for takin so long, finally got back to that trouble again. Ok, so Xephyr + OpenBox + Calibre = works fine. No idea why its not working properly with Xfce :(
Comment by Doug Newgard (Scimmia) - Saturday, 28 February 2015, 22:38 GMT
Well that's progress at least. Funny that it's running just fine in Xfce for me. Do you have compositing turned on? Maybe something with the Qt5 theme?
Comment by Daniel Fort (naquad) - Sunday, 01 March 2015, 11:15 GMT
Tried to turn off problem stayed. Qt5 is tighed to GTK+, didn't find a switch to set theme for calibre (like -style or something).
Comment by Doug Newgard (Scimmia) - Sunday, 01 March 2015, 16:44 GMT
Be interesting to see if this happens in Xfce 4.12, currently in testing.
Comment by Thiago Perrotta (thiagowfx) - Monday, 02 March 2015, 06:10 GMT
I'm also affected.
Calibre starts okay, but if I click on "edit" by selecting (apparently) any book:

Console output:
- https://gist.github.com/thiagowfx/ea271c4bda903fd8a1ba

Program versions:
calibre 2.20.0-1
pyqt5-common 5.4.1-1
python2-pyqt5 5.4.1-1

Graphical output (error message):
- Screenshot: https://www.flickr.com/photos/thiagowfx/16068929894/
- Content: https://gist.github.com/thiagowfx/0dccd5926875ee98665c
Comment by Evan McLean (ecognito) - Tuesday, 03 March 2015, 03:18 GMT
I think the recent updates to QT packages are the culprit. I tried running a makepkg for Calibre and it choked at the following:

$ sip -w -c /path/to/calibre/src/calibre-2.20.0/build/pyqt/pictureflow -b /path/to/calibre/src/calibre-2.20.0/build/pyqt/pictureflow/pictureflow.sip.sbf -I/usr/share/sip/Py2-PyQt5 -x VendorID -t WS_X11 -t Qt_5_4_1 -x Py_v3 /path/to/calibre/src/calibre-2.20.0/src/calibre/gui2/pictureflow/pictureflow.sip
sip: Unable to find file "QtWidgets/QtWidgetsmod.sip"
Comment by Evan McLean (ecognito) - Wednesday, 04 March 2015, 10:32 GMT
Has been registered in Calibre's bug tracker. If you have an account on launchpad, go over and mark yourself as affected to increase the "heat".

https://bugs.launchpad.net/calibre/+bug/1427684
Comment by Thiago Perrotta (thiagowfx) - Wednesday, 04 March 2015, 18:09 GMT
Temporary workaround that works for me:
downgrading python2-pyqt5 to 5.4.0-2.

Note: this works for my bug (see my last comment). Not yet sure if my bug is the same one as OP's.
Comment by Thue Janus Kristensen (thuejk) - Thursday, 05 March 2015, 02:28 GMT
This has been fixed upstream: https://github.com/kovidgoyal/calibre/commit/72d47ba9377d70e786bf3d93b323544188c894bd

Editing /usr/lib/calibre/calibre/gui2/widgets.py on my system with that change fixed the problem.
Comment by Thiago Perrotta (thiagowfx) - Thursday, 05 March 2015, 02:30 GMT
Just a simple line...yay. Nice!

Loading...