[osgeo4w-dev] [osgeo4w] #766: starting qgis from OSGeo4W shell: Couldn't load plugin 'processing'

OSGeo4W trac_osgeo4w at osgeo.org
Wed Nov 16 05:11:02 PST 2022


#766: starting qgis from OSGeo4W shell: Couldn't load plugin 'processing'
---------------------+---------------------------
Reporter:  jakimowb  |      Owner:  osgeo4w-dev@…
    Type:  defect    |     Status:  new
Priority:  major     |  Component:  Package
 Version:            |   Keywords:
---------------------+---------------------------
 If 'qgis-dev' has been started first, a following start of 'qgis' raises a
 `Couldn't load plugin 'processing' ` error due to broken GDAL pathes (see
 below).

 This isse was initially reported to
 https://github.com/qgis/QGIS/issues/50890

 {{{
 Couldn't load plugin 'processing'

 ImportError: Traceback (most recent call last):   File "F:\OSGeo4W\apps
 \gdal-dev\lib\site-packages\osgeo\__init__.py", line 30, in
 swig_import_helper     return importlib.import_module(mname)   File
 "F:\OSGeo4W\apps\Python39\lib\importlib\__init__.py", line 127, in
 import_module     return _bootstrap._gcd_import(name[level:], package,
 level)   File "", line 1030, in _gcd_import   File "", line 1007, in
 _find_and_load   File "", line 986, in _find_and_load_unlocked   File "",
 line 666, in _load_unlocked   File "", line 565, in module_from_spec
 File "", line 1173, in create_module   File "", line 228, in
 _call_with_frames_removed ImportError: DLL load failed while importing
 _gdal: The specified module could not be found. On Windows, with Python >=
 3.8, DLLs are no longer imported from the PATH. If gdalXXX.dll is in the
 PATH, then set the USE_PATH_FOR_GDAL_PYTHON=YES environment variable to
 feed the PATH into os.add_dll_directory().

 Traceback (most recent call last):
   File "F:\OSGeo4W\apps\gdal-dev\lib\site-packages\osgeo\__init__.py",
 line 30, in swig_import_helper
     return importlib.import_module(mname)
   File "F:\OSGeo4W\apps\Python39\lib\importlib\__init__.py", line 127, in
 import_module
     return _bootstrap._gcd_import(name[level:], package, level)
   File "", line 1030, in _gcd_import
   File "", line 1007, in _find_and_load
   File "", line 986, in _find_and_load_unlocked
   File "", line 666, in _load_unlocked
   File "", line 565, in module_from_spec
   File "", line 1173, in create_module
   File "", line 228, in _call_with_frames_removed
 ImportError: DLL load failed while importing _gdal: The specified module
 could not be found.

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "F:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 401, in
 loadPlugin
     __import__(packageName)
   File "F:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import
     mod = _builtin_import(name, globals, locals, fromlist, level)
   File "F:\OSGeo4W/apps/qgis/./python/plugins\processing\__init__.py",
 line 26, in
     from processing.tools.general import *  # NOQA
   File "F:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import
     mod = _builtin_import(name, globals, locals, fromlist, level)
   File
 "F:\OSGeo4W/apps/qgis/./python/plugins\processing\tools\general.py", line
 32, in
     from processing.core.Processing import Processing
   File "F:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import
     mod = _builtin_import(name, globals, locals, fromlist, level)
   File
 "F:\OSGeo4W/apps/qgis/./python/plugins\processing\core\Processing.py",
 line 58, in
     from processing.algs.qgis.QgisAlgorithmProvider import
 QgisAlgorithmProvider  # NOQA
   File "F:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import
     mod = _builtin_import(name, globals, locals, fromlist, level)
   File
 "F:\OSGeo4W/apps/qgis/./python/plugins\processing\algs\qgis\QgisAlgorithmProvider.py",
 line 49, in
     from .HypsometricCurves import HypsometricCurves
   File "F:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import
     mod = _builtin_import(name, globals, locals, fromlist, level)
   File
 "F:\OSGeo4W/apps/qgis/./python/plugins\processing\algs\qgis\HypsometricCurves.py",
 line 27, in
     from osgeo import gdal, ogr, osr
   File "F:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import
     mod = _builtin_import(name, globals, locals, fromlist, level)
   File "F:\OSGeo4W\apps\gdal-dev\lib\site-packages\osgeo\__init__.py",
 line 46, in
     _gdal = swig_import_helper()
   File "F:\OSGeo4W\apps\gdal-dev\lib\site-packages\osgeo\__init__.py",
 line 42, in swig_import_helper
     raise ImportError(traceback_string + '\n' + msg)
 ImportError: Traceback (most recent call last):
   File "F:\OSGeo4W\apps\gdal-dev\lib\site-packages\osgeo\__init__.py",
 line 30, in swig_import_helper
     return importlib.import_module(mname)
   File "F:\OSGeo4W\apps\Python39\lib\importlib\__init__.py", line 127, in
 import_module
     return _bootstrap._gcd_import(name[level:], package, level)
   File "", line 1030, in _gcd_import
   File "", line 1007, in _find_and_load
   File "", line 986, in _find_and_load_unlocked
   File "", line 666, in _load_unlocked
   File "", line 565, in module_from_spec
   File "", line 1173, in create_module
   File "", line 228, in _call_with_frames_removed
 ImportError: DLL load failed while importing _gdal: The specified module
 could not be found.

 On Windows, with Python >= 3.8, DLLs are no longer imported from the PATH.
 If gdalXXX.dll is in the PATH, then set the USE_PATH_FOR_GDAL_PYTHON=YES
 environment variable
 to feed the PATH into os.add_dll_directory().


 Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC
 v.1928 64 bit (AMD64)]
 QGIS version: 3.28.0-Firenze Firenze, ed3ad0430f3


 }}}
-- 
Ticket URL: <https://trac.osgeo.org/osgeo4w/ticket/766>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer and package environment for the OSGeo stack.


More information about the osgeo4w-dev mailing list