1

I have the following python errors when starting the QGIS 3.14:

2020-10-21T09:21:57
CRITICAL    Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\osgeo\osr.py", line 14, in swig_import_helper
  return importlib.import_module(mname)
  File "C:\OSGEO4~1\apps\Python37\lib\importlib\__init__.py", line 127, in import_module
  return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1006, in _gcd_import
  File "", line 983, in _find_and_load
  File "", line 967, in _find_and_load_unlocked
  File "", line 670, in _load_unlocked
  File "", line 583, in module_from_spec
  File "", line 1043, in create_module
  File "", line 219, in _call_with_frames_removed
 ImportError: DLL load failed: Nie można odnaleźć określonej procedury.
 
 During handling of the above exception, another exception occurred:
 
 Traceback (most recent call last):
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 334, in _startPlugin
  plugins[packageName] = package.classFactory(iface)
  File "C:/Users/jadwi/AppData/Roaming/QGIS/QGIS3\profiles\JTRO/python/plugins\go2streetview\__init__.py", line 34, in classFactory
  from .go2streetview import go2streetview
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 792, in _import
  mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/jadwi/AppData/Roaming/QGIS/QGIS3\profiles\JTRO/python/plugins\go2streetview\go2streetview.py", line 27, in 
  from .snapshot import snapShot
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 792, in _import
  mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/jadwi/AppData/Roaming/QGIS/QGIS3\profiles\JTRO/python/plugins\go2streetview\snapshot.py", line 25, in 
  from osgeo import ogr
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 792, in _import
  mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\osgeo\ogr.py", line 260, in 
  import osgeo.osr
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 792, in _import
  mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\osgeo\osr.py", line 17, in 
  _osr = swig_import_helper()
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\osgeo\osr.py", line 16, in swig_import_helper
  return importlib.import_module('_osr')
  File "C:\OSGEO4~1\apps\Python37\lib\importlib\__init__.py", line 127, in import_module
  return _bootstrap._gcd_import(name[level:], package, level)
 ModuleNotFoundError: No module named '_osr'
         
     
2020-10-21T09:22:06
CRITICAL    Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\osgeo\osr.py", line 14, in swig_import_helper
  return importlib.import_module(mname)
  File "C:\OSGEO4~1\apps\Python37\lib\importlib\__init__.py", line 127, in import_module
  return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1006, in _gcd_import
  File "", line 983, in _find_and_load
  File "", line 967, in _find_and_load_unlocked
  File "", line 670, in _load_unlocked
  File "", line 583, in module_from_spec
  File "", line 1043, in create_module
  File "", line 219, in _call_with_frames_removed
 ImportError: DLL load failed: Nie można odnaleźć określonej procedury.
 
 During handling of the above exception, another exception occurred:
 
 Traceback (most recent call last):
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 312, in loadPlugin
  __import__(packageName)
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 792, in _import
  mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\__init__.py", line 35, in 
  from processing.tools.raster import * # NOQA
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 792, in _import
  mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\tools\raster.py", line 26, in 
  from osgeo import gdal
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 792, in _import
  mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\osgeo\gdal.py", line 1756, in 
  import osgeo.ogr
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 792, in _import
  mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\osgeo\ogr.py", line 260, in 
  import osgeo.osr
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 792, in _import
  mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\osgeo\osr.py", line 17, in 
  _osr = swig_import_helper()
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\osgeo\osr.py", line 16, in swig_import_helper
  return importlib.import_module('_osr')
  File "C:\OSGEO4~1\apps\Python37\lib\importlib\__init__.py", line 127, in import_module
  return _bootstrap._gcd_import(name[level:], package, level)
 ModuleNotFoundError: No module named '_osr'

                 

and messages:

2020-10-21T09:21:48     WARNING    Plugin BDOT10k_GML_SHP_Loader : This plugin is disabled because it previously crashed QGIS.
2020-10-21T09:21:57     WARNING    Python error : Couldn't load plugin 'go2streetview' due to an error when calling its classFactory() method See message log (Python Error) for more details.
2020-10-21T09:21:59     WARNING    Python error : Couldn't load plugin 'pobieracz_danych_gugik' due to an error when calling its classFactory() method See message log (Python Error) for more details.
2020-10-21T09:21:59     WARNING    Python error : Couldn't load plugin 'qgis2web' due to an error when calling its classFactory() method See message log (Python Error) for more details.
2020-10-21T09:22:06     WARNING    Python error : Couldn't load plugin 'processing' See message log (Python Error) for more details.

Sample Python warnings:

WARNING warning:C:\OSGEO4~1\apps\Python37\lib\site-packages\PyQt5\uic\objcreator.py:152:DeprecationWarning: 'U' mode is deprecated 

WARNING warning:C:/Users/jadwi/AppData/Roaming/QGIS/QGIS3\profiles\JTRO/python/plugins\gissupport_plugin\modules\uldk\modules\map_point_search\main.py:11: DeprecationWarning: QgsCoordinateReferenceSystem.createFromSrid() is deprecated

WARNING warning:C:/Users/jadwi/AppData/Roaming/QGIS/QGIS3\profiles\JTRO/python/plugins\gissupport_plugin\modules\uldk\modules\point_layer_import\worker.py:20: DeprecationWarning: QgsCoordinateReferenceSystem.createFromSrid() is deprecated

I tried uninstalling all versions of QGIS and reinstalling it but that didn't solve the problem. Any ideas?

  • Is it the first time you encounter this problem? How did you install QGIS? Seems like QGIS cannot find a path to Python. – Taras Oct 21 at 8:24
  • This problem appers for the first time. I have recently installed several programs: PyCharm, SQLServer, SSMS, DataGrip...maybe there was some conflict?. – Jadwiga Trojak Oct 21 at 8:52
  • I installed QGIS with OSGeo4W installer – Jadwiga Trojak Oct 21 at 11:13
  • How did you install QGIS with OSGeo4W installer? Desktop, advanced? – user2856 Oct 22 at 3:28
  • Advanced install. I reported this as a bug on github qgis issues but my thread was closed quickly github.com/qgis/QGIS/issues/39539. – Jadwiga Trojak Oct 22 at 6:29
1

Just for comparison, the first file you list in your traceback, for my installation, is located here:

C:\Program Files\QGIS 3.14\apps\Python37\lib\site-packages\osgeo

In the github incident that got raised, they suggested that the problem is related to 3rd party installed plugins. However im assuming you are just installing from scratch BUT probably, your AppData folder contains previously installed QGIS plugin modules and files, which your new installation is trying to use.

ie: Anything in this folder

"C:/Users/jadwi/AppData/Roaming/QGIS/QGIS3\profiles"

Given that that folder is where your new QGIS installation will reference, just try making a backup of that folder from this path level "C:/Users/jadwi/AppData/Roaming/QGIS/" and then just rename it (call it QGIS_old) or something similar). Then run your installer again. This time, your new QGIS installation won't find your old folder and should at least eliminate that as being the problem.

Also just for reference, some instructions on uninstallation of QGIS and plugins

"https://umep-docs.readthedocs.io/en/latest/FAQ.html"

| improve this answer | |
  • Thank you! I'll try it and give a feedback here . – Jadwiga Trojak Oct 22 at 7:42
  • 1
    Before you wrote this answer I did this: I changed the OSGeo4W folder name (folder selected as root directory) to OSGeo4W_old and reinstalled QGIS using the installer. The installer created a new OSGeo4w folder and it helped. If I can see correctly, the problem has been eliminated and the QGIS settings have been saved (including profiles). – Jadwiga Trojak Oct 23 at 10:47
  • great to hear!! Glad it all worked out. – nr_aus Oct 26 at 1:04
0

I faced this same problem today after installing QGIS via OSGeo4W on a new computer. What I did to solve the problem was to remove the QGIS packages through the OSG4W installer and install the standalone version available on the official website.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.