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

Plugin doesn't load #52

Closed
johnwbryant opened this issue Dec 21, 2021 · 3 comments
Closed

Plugin doesn't load #52

johnwbryant opened this issue Dec 21, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@johnwbryant
Copy link

Describe the bug
Plugin doesn't load.

To Reproduce
Steps to reproduce the behavior:

  1. Open Plugin Manager
  2. Find Kart plugin and attempt to install
  3. Get error: Couldn't load plugin 'kart' due to an error when calling its classFactory() method, ModuleNotFoundError: No module named 'mock' (full error below)
  4. Install from zip instead
  5. Close & re-open QGIS
  6. 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
@johnwbryant johnwbryant added the bug Something isn't working label Dec 21, 2021
@rcoup
Copy link
Member

rcoup commented Dec 21, 2021

Hi John,

Where did your QGIS come from? UbuntuGIS? Built locally?

@volaya
Copy link
Contributor

volaya commented Dec 21, 2021

Should be fixed by 46a8aac

@volaya volaya closed this as completed Dec 21, 2021
@johnwbryant
Copy link
Author

Nice! Thanks @volaya, v1.01 installs without any issues.

@rcoup sorry for the late reply, maybe a moot point now, but my QGIS came from the QGIS Ubuntu repo here: https://qgis.org/ubuntu/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants