opengisch / QgisModelBaker

Create QGIS projects from database schemas or Interlis models
https://opengisch.github.io/QgisModelBaker/
GNU Lesser General Public License v3.0
55 stars 17 forks source link

Error when updating QgisModelBaker : Couldn't load plugin 'QgisModelBaker' due to an error when calling its classFactory() method #947

Closed swiss-knight closed 4 months ago

swiss-knight commented 4 months ago

I upgraded the model baker plugin today in QGIS 3.38.0-Grenoble on Ubuntu 22.04 but once started, a pop-up window showed this message:

Couldn't load plugin 'QgisModelBaker' due to an error when calling its classFactory() method 

ImportError: cannot import name 'override' from 'typing_extensions' (/usr/local/lib/python3.10/dist-packages/typing_extensions.py) 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 426, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/home/username/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QgisModelBaker/__init__.py", line 22, in classFactory
    from .qgismodelbaker import QgisModelBakerPlugin
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 923, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/username/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QgisModelBaker/qgismodelbaker.py", line 54, in 
    from QgisModelBaker.gui.workflow_wizard.workflow_wizard import WorkflowWizardDialog
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 923, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/username/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QgisModelBaker/gui/workflow_wizard/workflow_wizard.py", line 30, in 
    from QgisModelBaker.gui.workflow_wizard.database_selection_page import (
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 923, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/username/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QgisModelBaker/gui/workflow_wizard/database_selection_page.py", line 24, in 
    from QgisModelBaker.gui.panel import db_panel_utils
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 923, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/username/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QgisModelBaker/gui/panel/db_panel_utils.py", line 7, in 
    from QgisModelBaker.gui.panel.pg_config_panel import PgConfigPanel
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 923, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/username/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QgisModelBaker/gui/panel/pg_config_panel.py", line 25, in 
    from typing_extensions import override
ImportError: cannot import name 'override' from 'typing_extensions' (/usr/local/lib/python3.10/dist-packages/typing_extensions.py)

Python version: 3.10.12 (main, Mar 22 2024, 16:50:05) [GCC 11.4.0] 
QGIS version: 3.38.0-Grenoble Grenoble, 37aa6188bc3 

Python Path:
/usr/share/qgis/python
/home/username/.local/share/QGIS/QGIS3/profiles/default/python
/home/username/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/home/username
/usr/share/qgis/python
/home/username/.local/share/QGIS/QGIS3/profiles/default/python
/home/username/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python310.zip
/usr/lib/python3.10
/usr/lib/python3.10/lib-dynload
/usr/lib/python3/dist-packages
/home/username/.local/lib/python3.10/site-packages
/usr/local/lib/python3.10/dist-packages
/home/username/.local/share/QGIS/QGIS3/profiles/default/python
.

The plugin seems successfully installed. But I'm not sure if this error stack will have any influence on the behaviour of that plugin...

More about my QGIS install:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

QGIS version | 3.38.0-Grenoble | QGIS code revision | 37aa6188bc3 -- | -- | -- | -- Qt version | 5.15.3 Python version | 3.10.12 GDAL/OGR version | 3.4.1 PROJ version | 8.2.1 EPSG Registry database version | v10.041 (2021-12-03) GEOS version | 3.10.2-CAPI-1.16.0 SQLite version | 3.37.2 PDAL version | 2.3.0 PostgreSQL client version | 14.12 (Ubuntu 14.12-0ubuntu0.22.04.1) SpatiaLite version | 5.0.1 QWT version | 6.1.4 QScintilla2 version | 2.11.6 OS version | Ubuntu 22.04.4 LTS   |   |   |   Active Python plugins plugin_reloader | 0.9.4 kart | 1.0.14 Serval | 3.32.0 qgis-maptiler-plugin | 3.3 interlis | 0.14.8 QuickWKT | 3.1 linking_relation_editor | v1.3.0 QgisModelBaker | v7.8.4 profiletool | 4.2.6 QuickOSM | 2.2.3 pluginbuilder3 | 3.2.1 quick_map_services | 0.19.34 db_manager | 0.1.20 processing | 2.12.99 MetaSearch | 0.3.6 grassprovider | 2.12.99
signedav commented 4 months ago

Related to #945