Describe the bug
Plugin doesn't load.
To Reproduce
Steps to reproduce the behavior:
- Open Plugin Manager
- Find Kart plugin and attempt to install
- Get error:
Couldn't load plugin 'kart' due to an error when calling its classFactory() method, ModuleNotFoundError: No module named 'mock'
(full error below)
- Install from zip instead
- Close & re-open QGIS
- On QGIS start, same error
Expected behavior
I expected the plugin to install & open without error.
Version info (this is important!):
- Operating System (e.g. Windows 10, macOS): Ubuntu 20.04
- QGIS, Kart & Plugin details:
- Kart v0.10.7
- QGIS version: 3.22.1
Additional context
Full error message:
Couldn't load plugin 'kart' due to an error when calling its classFactory() method
ModuleNotFoundError: No module named 'mock'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 423, in _startPlugin
plugins[packageName] = package.classFactory(iface)
File "/home/john/.local/share/QGIS/QGIS3/profiles/default/python/plugins/kart/__init__.py", line 2, in classFactory
from kart.plugin import KartPlugin
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/john/.local/share/QGIS/QGIS3/profiles/default/python/plugins/kart/plugin.py", line 11, in
from kart.gui.dockwidget import KartDockWidget
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/john/.local/share/QGIS/QGIS3/profiles/default/python/plugins/kart/gui/dockwidget.py", line 27, in
from kart.kartapi import (
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/john/.local/share/QGIS/QGIS3/profiles/default/python/plugins/kart/kartapi.py", line 31, in
from kart.gui.installationwarningdialog import InstallationWarningDialog
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/john/.local/share/QGIS/QGIS3/profiles/default/python/plugins/kart/gui/installationwarningdialog.py", line 13, in
from kart.gui.settingsdialog import SettingsDialog
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/john/.local/share/QGIS/QGIS3/profiles/default/python/plugins/kart/gui/settingsdialog.py", line 9, in
from kart.utils import setting, setSetting, KARTPATH, AUTOCOMMIT, DIFFSTYLES
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/john/.local/share/QGIS/QGIS3/profiles/default/python/plugins/kart/utils.py", line 7, in
from qgis.testing.mocked import get_iface
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/usr/lib/python3/dist-packages/qgis/testing/mocked.py", line 26, in
import mock
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'mock'
Python version: 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0]
QGIS version: 3.22.1-Białowieża Białowieża, 663dcf8fb9
Python Path:
/usr/share/python-wheels/chardet-3.0.4-py2.py3-none-any.whl
/usr/share/python-wheels/requests-2.22.0-py2.py3-none-any.whl
/usr/share/python-wheels/colorama-0.4.3-py2.py3-none-any.whl
/usr/share/python-wheels/html5lib-1.0.1-py2.py3-none-any.whl
/usr/share/python-wheels/toml-0.10.0-py2.py3-none-any.whl
/usr/share/python-wheels/lockfile-0.12.2-py2.py3-none-any.whl
/usr/share/python-wheels/setuptools-44.0.0-py2.py3-none-any.whl
/usr/share/python-wheels/progress-1.5-py2.py3-none-any.whl
/usr/share/python-wheels/packaging-20.3-py2.py3-none-any.whl
/usr/share/python-wheels/retrying-1.3.3-py2.py3-none-any.whl
/usr/share/python-wheels/idna-2.8-py2.py3-none-any.whl
/usr/share/python-wheels/wheel-0.34.2-py2.py3-none-any.whl
/usr/share/python-wheels/six-1.14.0-py2.py3-none-any.whl
/usr/share/python-wheels/webencodings-0.5.1-py2.py3-none-any.whl
/usr/share/python-wheels/distlib-0.3.0-py2.py3-none-any.whl
/usr/share/python-wheels/msgpack-0.6.2-py2.py3-none-any.whl
/usr/share/python-wheels/ipaddr-2.2.0-py2.py3-none-any.whl
/usr/share/python-wheels/pyparsing-2.4.6-py2.py3-none-any.whl
/usr/share/python-wheels/distro-1.4.0-py2.py3-none-any.whl
/usr/share/python-wheels/pip-20.0.2-py2.py3-none-any.whl
/usr/share/python-wheels/contextlib2-0.6.0-py2.py3-none-any.whl
/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl
/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl
/usr/share/python-wheels/certifi-2019.11.28-py2.py3-none-any.whl
/usr/share/python-wheels/pep517-0.8.2-py2.py3-none-any.whl
/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl
/usr/share/python-wheels/appdirs-1.4.3-py2.py3-none-any.whl
/usr/share/qgis/python
/home/john/.local/share/QGIS/QGIS3/profiles/default/python
/home/john/.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/local/lib/python3.8/dist-packages
/usr/lib/python3/dist-packages
/home/john/.local/share/QGIS/QGIS3/profiles/default/python
bug