Couldn't load plugin 'inasafe' due to an error when calling its initGui() method

18 views
Skip to first unread message

strauwuberry

unread,
Feb 26, 2025, 12:08:57 AM2/26/25
to inasafe-users
Good day.

I have the QGIS 3.40.1 version and have a problem installing the inaSAFE plugin.

ModuleNotFoundError: No module named 'imp'

Traceback (most recent call last):
  File "C:\PROGRA~1/QGIS34~1.1/apps/qgis/./python\qgis\utils.py", line 451, in startPlugin
    plugins[packageName].initGui()
  File "C:\Users/Lenovo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\inasafe\safe\plugin.py", line 563, in initGui
    self._create_dock()
  File "C:\Users/Lenovo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\inasafe\safe\plugin.py", line 538, in _create_dock
    from safe.gui.widgets.dock import Dock
  File "C:\PROGRA~1/QGIS34~1.1/apps/qgis/./python\qgis\utils.py", line 966, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/Lenovo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\inasafe\safe\gui\widgets\dock.py", line 90, in
    from safe.gui.analysis_utilities import (
  File "C:\PROGRA~1/QGIS34~1.1/apps/qgis/./python\qgis\utils.py", line 966, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/Lenovo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\inasafe\safe\gui\analysis_utilities.py", line 13, in
    from safe.impact_function.impact_function_utilities import FROM_CANVAS
  File "C:\PROGRA~1/QGIS34~1.1/apps/qgis/./python\qgis\utils.py", line 966, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/Lenovo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\inasafe\safe\impact_function\impact_function_utilities.py", line 20, in
    from safe.report.impact_report import ImpactReport
  File "C:\PROGRA~1/QGIS34~1.1/apps/qgis/./python\qgis\utils.py", line 966, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/Lenovo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\inasafe\safe\report\impact_report.py", line 10, in
    import imp
  File "C:\PROGRA~1/QGIS34~1.1/apps/qgis/./python\qgis\utils.py", line 966, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'imp'


Python version: 3.12.7 (main, Oct 25 2024, 11:18:09) [MSC v.1938 64 bit (AMD64)]
QGIS version: 3.40.1-Bratislava Bratislava, 989853a7

Python Path:
  • C:/PROGRA~1/QGIS34~1.1/apps/qgis/./python
  • C:/Users/Lenovo/AppData/Roaming/QGIS/QGIS3\profiles\default/python
  • C:/Users/Lenovo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
  • C:/PROGRA~1/QGIS34~1.1/apps/qgis/./python/plugins
  • C:\PROGRA~1\QGIS34~1.1\apps\grass\grass84\etc\python
  • C:\Users\Lenovo\Documents
  • C:\Program Files\QGIS 3.40.1\bin\python312.zip
  • C:\PROGRA~1\QGIS34~1.1\apps\Python312\DLLs
  • C:\PROGRA~1\QGIS34~1.1\apps\Python312\Lib
  • C:\Program Files\QGIS 3.40.1\bin
  • C:\PROGRA~1\QGIS34~1.1\apps\Python312
  • C:\PROGRA~1\QGIS34~1.1\apps\Python312\Lib\site-packages
  • C:\PROGRA~1\QGIS34~1.1\apps\Python312\Lib\site-packages\win32
  • C:\PROGRA~1\QGIS34~1.1\apps\Python312\Lib\site-packages\win32\lib
  • C:\PROGRA~1\QGIS34~1.1\apps\Python312\Lib\site-packages\Pythonwin
  • C:/Users/Lenovo/AppData/Roaming/QGIS/QGIS3\profiles\default/python
  • C:\Users\Lenovo\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\inasafe\safe_extras\parameters
  • C:\Users\Lenovo\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins
  • C:\Users\Lenovo\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\inasafe\safe_extras
  • C:\Users\Lenovo\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins

I've attached the detailed information about my QGIS.Screenshot 2025-02-26 130721.png


Reply all
Reply to author
Forward
0 new messages