3

Unfortunatly the processing plugin stopped working and I don't know why. When starting QGIS (2.18.2) I get the error: TypeError: coercing to Unicode: need string or buffer, NoneType found .

Did anyone else come across this problem lately?

Traceback (most recent call last):
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 333, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/__init__.py", line 38, in classFactory
    return ProcessingPlugin(iface)
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/ProcessingPlugin.py", line 58, in __init__
    Processing.initialize()
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/Processing.py", line 148, in initialize
    Processing.addProvider(c())
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/Processing.py", line 103, in addProvider
    % (provider.getDescription(), traceback.format_exc()))
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/algs/saga/SagaAlgorithmProvider.py", line 123, in getDescription
    version = SagaUtils.getSagaInstalledVersion()
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/algs/saga/SagaUtils.py", line 130, in getSagaInstalledVersion
    commands = [os.path.join(sagaPath(), "saga_cmd -v")]
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/algs/saga/SagaUtils.py", line 75, in sagaPath
    if not os.path.isdir(folder):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/genericpath.py", line 49, in isdir
    st = os.stat(s)
TypeError: coercing to Unicode: need string or buffer, NoneType found
  • if you go into the QGIS python console, what output do you get for print(QgsApplication.prefixPath()) ? Is it 'None' ...? – Steven Kay May 3 '17 at 18:04
  • Sorry if this is a stupid question but I have basically no pyhton programming experience. When I open the Python console and type in print(QgsApplication.prefixPath()) I get: /Applications/QGIS.app/Contents/MacOS it does not say 'None'. – LaTradision May 3 '17 at 18:14
2

I think this might be a known issue.

I found this change from January which looks like it might fix the error you're seeing (it's failing if the saga path hasn't been set up for any reason)

I'm not sure if that's a complete fix or even if it's made it into a release. In older versions of QGIS you used to have to set the path manually using Processing > Settings > Providers, but newer versions you don't need to.

If you update your question with the OS (Linux or Mac) and which build (e.g ubuntugis, standard qgis, ubuntu repo, kyngchaos or homebrew) it might help narrow the problem.

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.