Skip to content

QGIS 4.0 compability #137

Description

@fcarbone-pixel

I'm not able to load plugins in QGIS 4.0 due to an error when calling its classFactory():

Impossibile caricare il plugin 'ImportPhotos' a causa di un errore chiamando il metodo classFactory()

ModuleNotFoundError: No module named 'defusedxml'
Traceback (most recent call last):
File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 477, in startPlugin
plugins[packageName] = package.classFactory(iface)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/Utente/AppData/Roaming/QGIS/QGIS4\profiles\default/python/plugins\ImportPhotos_init
.py", line 32, in classFactory
from .ImportPhotos import ImportPhotos
File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 1084, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/Utente/AppData/Roaming/QGIS/QGIS4\profiles\default/python/plugins\ImportPhotos\ImportPhotos.py", line 40, in
from .code.xmp_utils import get_flight_yaw
File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 1084, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/Utente/AppData/Roaming/QGIS/QGIS4\profiles\default/python/plugins\ImportPhotos\code\xmp_utils.py", line 8, in
from defusedxml import ElementTree as ET
File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 1084, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'defusedxml'

Versione Python: 3.12.13 (main, Apr 16 2026, 15:59:38) [MSC v.1944 64 bit (AMD64)]
Versione di QGIS: 4.0.2-Norrköping Norrköping, bb929340

Percorso Python:
C:/OSGeo4W/apps/qgis/./python
C:/Users/Utente/AppData/Roaming/QGIS/QGIS4\profiles\default/python
C:/Users/Utente/AppData/Roaming/QGIS/QGIS4\profiles\default/python/plugins
C:/OSGeo4W/apps/qgis/./python/plugins
C:\OSGeo4W\apps\grass\grass84\etc\python
C:\WINDOWS\system32
C:\OSGeo4W\bin\python312.zip
C:\OSGeo4W\apps\Python312\DLLs
C:\OSGeo4W\apps\Python312\Lib
C:\OSGeo4W\bin
C:\OSGeo4W\apps\Python312
C:\OSGeo4W\apps\Python312\Lib\site-packages
C:\OSGeo4W\apps\Python312\Lib\site-packages\win32
C:\OSGeo4W\apps\Python312\Lib\site-packages\win32\lib
C:\OSGeo4W\apps\Python312\Lib\site-packages\Pythonwin
C:/Users/Utente/AppData/Roaming/QGIS/QGIS4\profiles\default/python
C:\Users\Utente\AppData\Roaming\QGIS\QGIS4\profiles\default\python\plugins\mmqgis/forms
C:\Users\Utente\AppData\Roaming\QGIS\QGIS4\profiles\default\python\plugins\qfieldsync\libqfieldsync_b3541aa99630f39354e479c75f0f1bcb2f7020ba.whl
C:/Users/Utente/OneDrive/CFC/gis

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions