I would like to join attributes by location using standalone PyQGIS but im getting error. I have QGIS 3.16 installed on my machine.

from qgis.core import *

QgsApplication.setPrefixPath("C:/Program Files/QGIS 3.16/apps/qgis", True)
qgs = QgsApplication([], True)

import processing
from processing.core.Processing import Processing

processing.run("qgis:joinattributesbylocation", {

And im getting the error:

Traceback (most recent call last): File "", line 1, in File "C:/PROGRA~1/QGIS3~1.16/apps/qgis/./python/plugins\processing\tools\general.py", line 108, in run return Processing.runAlgorithm(algOrName, parameters, onFinish, feedback, context) File "C:/PROGRA~1/QGIS3~1.16/apps/qgis/./python/plugins\processing\core\Processing.py", line 141, in runAlgorithm raise QgsProcessingException(msg) _core.QgsProcessingException: Error: Algorithm qgis:joinattributesbylocation not found

What is the problem?

  • What if you try running Processing.updateAlgsList() after Processing.initialize()? Additionally make sure that %QGIS_PATH%\apps\qgis\python\plugins\processing is added to the PYTHON_PATH environment variable. – Taras Nov 3 at 7:27
  • I solved that problem, thank you. I have another problem: gis.stackexchange.com/questions/378188/… – datasciencebegginer Nov 3 at 7:29


I transfered folder "platforms" (C:\Program Files\QGIS 3.16\apps\qt5\plugins\platforms) to:

C:\Program Files\QGIS 3.16\bin and C:\Program Files\QGIS 3.16\apps\Python37

| 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.