Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
vvmruder opened this issue Jun 7, 2023 · 1 comment · Fixed by #82
Closed

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

vvmruder opened this issue Jun 7, 2023 · 1 comment · Fixed by #82
Assignees

Comments

@vvmruder
Copy link
Member

vvmruder commented Jun 7, 2023

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
Copy link
Member

3nids commented Jun 7, 2023

Looks like you compiled QGIS without QtWebkit.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants