Hi, I cannot find a way to get some QGIS plugins working. I started to receive the import error a few months ago on ~amd64. Couldn't load plugin 'batch_gps_importer' due to an error when calling its classFactory() method ModuleNotFoundError: No module named 'PyQt5.QtWebKit' Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/qgis/utils.py", line 423, in _startPlugin plugins[packageName] = package.classFactory(iface) File "/home/mmokrejs/.local/share/QGIS/QGIS3/profiles/default/python/plugins/batch_gps_importer/__init__.py", line 6, in classFactory from .batch_gps_importer import BatchGpsImporter File "/usr/lib/python3.8/site-packages/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/home/mmokrejs/.local/share/QGIS/QGIS3/profiles/default/python/plugins/batch_gps_importer/batch_gps_importer.py", line 26, in from .ui.gps_importer_starter import GpsImporter File "/usr/lib/python3.8/site-packages/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/home/mmokrejs/.local/share/QGIS/QGIS3/profiles/default/python/plugins/batch_gps_importer/ui/gps_importer_starter.py", line 35, in from PyQt5.QtWebKit import QWebSettings File "/usr/lib/python3.8/site-packages/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'PyQt5.QtWebKit' Python version: 3.8.13 (default, Jul 2 2022, 22:51:55) [GCC 12.1.1 20220625] QGIS version: 3.22.8-Białowieża Białowieża, exported Python Path: /usr/share/qgis/python /home/mmokrejs/.local/share/QGIS/QGIS3/profiles/default/python /home/mmokrejs/.local/share/QGIS/QGIS3/profiles/default/python/plugins /usr/share/qgis/python/plugins /usr/lib/python38.zip /usr/lib/python3.8 /usr/lib/python3.8/lib-dynload /usr/lib/python3.8/site-packages /home/mmokrejs/.local/share/QGIS/QGIS3/profiles/default/python # emerge -pv PyQt5 These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-python/PyQt5-5.15.6::gentoo USE="bluetooth dbus designer gui location network opengl positioning printsupport sql ssl svg webchannel websockets widgets -debug -declarative -examples -gles2-only -help -multimedia -sensors -serialport -speech -testlib -x11extras -xmlpatterns" PYTHON_TARGETS="python3_8 python3_9 -python3_10 -python3_11" 0 KiB Where is some qt-related USE flag? # emerge -pv dev-qt/qtwebkit These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-qt/qtwebkit-5.212.0_pre20200309-r2:5/5.212::stefantalpalaru USE="X geolocation hyphen jit opengl printsupport webp -gles2-only -gstreamer -multimedia -nsplugin -orientation -qml" 0 KiB Thank you.
PyQt5 can not support packages that are not in tree. QGIS plugins must port away from webkit.
Also PyQt5 package does not have webkit/webengine modules at all either way, you need PyQtWebkit (like dev-python/PyQtWebEngine)
# emerge -s PyQtWebEngine [ Results for search key : PyQtWebEngine ] Searching... * dev-python/PyQtWebEngine Latest version available: 5.15.5 Latest version installed: 5.15.5 Size of files: 48 KiB Homepage: https://www.riverbankcomputing.com/software/pyqtwebengine/ https://pypi.org/project/PyQtWebEngine/ Description: Python bindings for QtWebEngine License: GPL-3 * dev-qt/qtwebengine Latest version available: 5.15.5_p20220618 Latest version installed: 5.15.5_p20220618 Size of files: 312,666 KiB Homepage: https://www.qt.io/ Description: Library for rendering dynamic web content in Qt5 C++ and QML applications License: || ( GPL-2 GPL-3 LGPL-3 ) FDL-1.3 # OK, I will reinstal them both (although I think I already did a number of times since the errors started to occur). # emerge -pv dev-python/PyQtWebEngine dev-qt/qtwebengine These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-qt/qtwebengine-5.15.5_p20220618:5/5.15::gentoo USE="alsa geolocation jumbo-build system-ffmpeg system-icu widgets -bindist -debug -designer -kerberos -pulseaudio -screencast -test" 0 KiB [ebuild R ] dev-python/PyQtWebEngine-5.15.5::gentoo USE="-debug" PYTHON_TARGETS="python3_8 python3_9 -python3_10 -python3_11" 0 KiB Thanks for your inputs.
Webengine is what /should/ be used, but PyQtWebEngine does not give qtwebkit modules (aka upstreams should migrate to webengine or something else and not use qtwebkit anymore) As I mentioned, you'd need PyQtWebKit for that and it's not packaged nor supported in ::gentoo, qtwebkit is insecure and dead upstream (your qtwebkit is coming from an overlay).