1

After installing both QGIS 2.18.17 and QGIS 3.0 in parallel using OSGeo4W the processing framework/toolbox etc. no longer loads in QGIS 2.18.17 (or other earlier than 3.0 version) when starting QGIS.

I have tried various combinations of reinstalling, uninstalling and using different versions, to no avail.

This is the error message I get:

warning:C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py:607: ImportWarning: Not importing directory 'C:\OSGEO4~1\apps\Python27\lib\site-packages\win32\test': missing __init__.py
          mod = _builtin_import(name, globals, locals, fromlist, level)

        traceback:  File "<string>", line 1, in <module>
          File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 333, in startPlugin
            plugins[packageName] = package.classFactory(iface)
          File "C:/Users/user/.qgis2/python/plugins\BufferByPercentage\__init__.py", line 52, in classFactory
            from bufferbypercentage import BufferByPercentagePlugin
          File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 607, in _import
            mod = _builtin_import(name, globals, locals, fromlist, level)
          File "C:/Users/user/.qgis2/python/plugins\BufferByPercentage\bufferbypercentage.py", line 36, in <module>
            from processing.core.Processing import Processing
          File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 607, in _import
            mod = _builtin_import(name, globals, locals, fromlist, level)
          File "C:/OSGEO4~1/apps/qgis-ltr/./python/plugins\processing\__init__.py", line 29, in <module>
            from processing.tools.general import *              # NOQA
          File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 607, in _import
            mod = _builtin_import(name, globals, locals, fromlist, level)
          File "C:/OSGEO4~1/apps/qgis-ltr/./python/plugins\processing\tools\general.py", line 31, in <module>
            from processing.core.Processing import Processing
          File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 607, in _import
            mod = _builtin_import(name, globals, locals, fromlist, level)
          File "C:/OSGEO4~1/apps/qgis-ltr/./python/plugins\processing\core\Processing.py", line 62, in <module>
            from processing.algs.saga.SagaAlgorithmProvider import SagaAlgorithmProvider
          File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 607, in _import
            mod = _builtin_import(name, globals, locals, fromlist, level)
          File "C:/OSGEO4~1/apps/qgis-ltr/./python/plugins\processing\algs\saga\SagaAlgorithmProvider.py", line 33, in <module>
            from SagaAlgorithm import SagaAlgorithm
          File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 607, in _import
            mod = _builtin_import(name, globals, locals, fromlist, level)
          File "C:/OSGEO4~1/apps/qgis-ltr/./python/plugins\processing\algs\saga\SagaAlgorithm.py", line 20, in <module>
            standard_library.install_aliases()
          File "C:\OSGEO4~1\apps\Python27\lib\site-packages\future\standard_library\__init__.py", line 483, in install_aliases
            import test

and ... :

1   Traceback (most recent call last):
          File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 333, in startPlugin
            plugins[packageName] = package.classFactory(iface)
          File "C:/OSGEO4~1/apps/qgis-ltr/./python/plugins\processing\__init__.py", line 37, in classFactory
            from processing.ProcessingPlugin import ProcessingPlugin
          File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 607, in _import
            mod = _builtin_import(name, globals, locals, fromlist, level)
          File "C:/OSGEO4~1/apps/qgis-ltr/./python/plugins\processing\ProcessingPlugin.py", line 38, in <module>
            from processing.gui.ProcessingToolbox import ProcessingToolbox
          File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 607, in _import
            mod = _builtin_import(name, globals, locals, fromlist, level)
          File "C:/OSGEO4~1/apps/qgis-ltr/./python/plugins\processing\gui\ProcessingToolbox.py", line 31, in <module>
            from qgis.PyQt import uic
        ImportError: cannot import name uic

Are there any recommended ways to fix this problem so that processing will still work with QGIS 2.xxx?

1 Answer 1

1

Try launching QGIS 2 through the bat file in the OSGeo4W folder:

C:\OSGeo4W64\bin

qgis-ltr.bat

This will set the correct environmental variables and processing should work.

2
  • thanks for the suggestion but unfortunately the problem persists.
    – guestagain
    Commented Mar 13, 2018 at 11:46
  • I have a similar problem on WIN 7: QGIS 3.0 does not load Processing (and neither the python concole). The developer version of QGIS (3.1xxx) instead has no problem at all.
    – seba
    Commented Mar 19, 2018 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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