Summary: | app-text/calibre-3.15.0::gentoo Importing PyQt4 is not allowed as calibre uses PyQt5 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jonas Stein <jstein> |
Component: | Current packages | Assignee: | Zac Medico <zmedico> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | dschridde+gentoobugs, eschwartz, jstein, zmedico |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | emerge --info |
Maybe this shows something: grep -r PyQt4 ~/.config/calibre Thank you. grep -r PyQt4 ~/.config/calibre returns a hit "kobo": "# -*-\n\nfrom __future__ import (unicode_literals, division, absolute_import, print_function)\nstore_version = 2 # Needed for dynamic plugin loading\n\n__license__ = 'GPL 3'\n__copyright__ = '2011, John Schember <john@nachtimwald.com>'\n__docformat__ = 'restructuredtext en'\n\nimport random\nimport urllib\nimport urllib2\nfrom contextlib import closing\n\nfrom lxml import html\n\nfrom PyQt4.Qt import QUrl\n\nfrom calibre import browser, [..] I think now that the message I saw was not two bugs, but one. So I will close the other ticket as duplicate and paste the complete output here. ----8<----------------------------------------------------------------- $ calibre Failed to load cached store: kobo Traceback (most recent call last): File "/usr/lib64/calibre/calibre/gui2/store/loader.py", line 91, in load_cache obj, ver = self.load_object(src, key) File "/usr/lib64/calibre/calibre/gui2/store/loader.py", line 178, in load_object exec src in namespace File "<string>", line 17, in <module> File "/usr/lib64/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 Failed to load cached store: google_books Traceback (most recent call last): File "/usr/lib64/calibre/calibre/gui2/store/loader.py", line 91, in load_cache obj, ver = self.load_object(src, key) File "/usr/lib64/calibre/calibre/gui2/store/loader.py", line 178, in load_object exec src in namespace File "<string>", line 15, in <module> File "/usr/lib64/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 Failed to load cached store: woblink Traceback (most recent call last): File "/usr/lib64/calibre/calibre/gui2/store/loader.py", line 91, in load_cache obj, ver = self.load_object(src, key) File "/usr/lib64/calibre/calibre/gui2/store/loader.py", line 178, in load_object exec src in namespace File "<string>", line 17, in <module> File "/usr/lib64/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 ----8<----------------------------------------------------------------- My plugin settins say that no plugin is activated. Perhaps an upstream bug that they try to load an obsolete plugin even if it is disabled? *** Bug 643908 has been marked as a duplicate of this bug. *** Since upstream doesn't support install from source, you might try to reproduce the issue using an "isolated" install in ~/calibre-bin, as described near the end of the binary install section here: https://calibre-ebook.com/download_linux Current versions of calibre don't even include this error message. It was removed in 2020 as part of the bump to calibre 5.0.0 In calibre 6.x an import hook is installed that redirects these to aliased modules via `import qt.core` etc (internal calibre module). (And for context, this isn't a binary install vs from source install issue. You should get the same issue with the upstream bins, if you have an outdated config file. I cannot remember anymore but I *think* at some point a migration tool was added that cleaned up stale references baked into config files -- you'd still get the error for plugins of course, but that's expected as the plugin would need to be updated to support PyQt5.) |
Created attachment 513770 [details] emerge --info dev-python/PyQt4-4.12.1 and dev-python/PyQt5-5.9.2 are installed here. calibre writes to stdout after startup: Traceback (most recent call last): File "/usr/lib64/calibre/calibre/gui2/store/loader.py", line 91, in load_cache obj, ver = self.load_object(src, key) File "/usr/lib64/calibre/calibre/gui2/store/loader.py", line 178, in load_object exec src in namespace File "<string>", line 17, in <module> File "/usr/lib64/calibre/calibre/startup.py", line 36, in load_module raise ImportError('Importing PyQt4 is not allowed as calibre uses PyQt5')