opengisch / qgis-swiss-locator

Swiss Geoadmin layer and feature search for QGIS 3
https://www.opengis.ch/2024/06/25/swiss-locator-plugin-3-0-is-here-with-exciting-features/
GNU General Public License v3.0
11 stars 4 forks source link

ModuleNotFoundError: No module named 'PyQt5.QtWebKit' #57

Closed vvmruder closed 1 month ago

vvmruder commented 1 year ago
ModuleNotFoundError: No module named 'PyQt5.QtWebKit' 
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/qgis/utils.py", line 423, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kalle/.local/share/QGIS/QGIS3/profiles/default/python/plugins/swiss_locator/__init__.py", line 34, in classFactory
    from .swiss_locator_plugin import SwissLocatorPlugin
  File "/usr/lib/python3.11/site-packages/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kalle/.local/share/QGIS/QGIS3/profiles/default/python/plugins/swiss_locator/swiss_locator_plugin.py", line 26, in 
    from swiss_locator.core.filters.swiss_locator_filter_feature import (
  File "/usr/lib/python3.11/site-packages/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kalle/.local/share/QGIS/QGIS3/profiles/default/python/plugins/swiss_locator/core/filters/swiss_locator_filter_feature.py", line 32, in 
    from swiss_locator.core.filters.swiss_locator_filter import (
  File "/usr/lib/python3.11/site-packages/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kalle/.local/share/QGIS/QGIS3/profiles/default/python/plugins/swiss_locator/core/filters/swiss_locator_filter.py", line 61, in 
    from swiss_locator.gui.maptip import MapTip
  File "/usr/lib/python3.11/site-packages/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kalle/.local/share/QGIS/QGIS3/profiles/default/python/plugins/swiss_locator/gui/maptip.py", line 25, in 
    from PyQt5.QtWebKit import QWebSettings
  File "/usr/lib/python3.11/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.11.3 (main, Apr 5 2023, 15:52:25) [GCC 12.2.1 20230201] QGIS-Version: 3.30.3-'s-Hertogenbosch 's-Hertogenbosch, exported

Installed versions of PyQt

Name: PyQt6 Version: 6.5.1 Summary: Python bindings for the Qt cross platform application toolkit Home-page: https://www.riverbankcomputing.com/software/pyqt/ Author: Riverbank Computing Limited Author-email: info@riverbankcomputing.com License: GPL v3 Location: /usr/lib/python3.11/site-packages Requires: PyQt6-sip Required-by: PyQt6-WebEngine

Name: PyQt5 Version: 5.15.9 Summary: Python bindings for the Qt cross platform application toolkit Home-page: https://www.riverbankcomputing.com/software/pyqt/ Author: Riverbank Computing Limited Author-email: info@riverbankcomputing.com License: GPL v3 Location: /usr/lib/python3.11/site-packages Requires: PyQt5-sip Required-by: picard, PyQtWebEngine, QScintilla

Maybe related to: https://stackoverflow.com/questions/37876987/cannot-import-qtwebkitwidgets-in-pyqt5

3nids commented 1 year ago

Looks like you compiled QGIS without QtWebkit.

A fix for this would be to disable the maptip if QtWebkit is not installed.