I'm trying to combine shapefiles in a folder of mine, but everytime i run it or run a variation of this it gives me the same error, "Error: Algorithm not found"
this is my code:
import os
import glob
import urllib
import sys
import zipfile
import processing
from processing.core.Processing import Processing
Processing.initialize()
Processing.updateAlgsList()
processing.alglist("merge")
processing.alghelp("qgis:mergevectorlayers")
pth = "C:/Users/Light/Desktop/qgis_data/tiled_footprints/"
files = glob.glob(pth + "*.shp")
out = pth + "merged.shp"
processing.runandload("saga:mergeshapeslayers", files.pop(0), ";".join(files), out)
I followed the advice of this thread here: Error: Algorithm not found (QGIS)
and I created the path, PYTHON_PATH in the system environment variables but still nothing.
-
Is SAGA installed properly? Can you see SAGA algorithms in the processing panel?Zoltan– Zoltan2016年06月21日 05:33:23 +00:00Commented Jun 21, 2016 at 5:33
1 Answer 1
You may not be calling the correct algorithm.
first you are looking at the qgis merge
processing.alghelp("qgis:mergevectorlayers")
later on you're calling a non-existing saga algorithm
processing.runandload("saga:mergeshapeslayers", files.pop(0), ";".join(files), out)
the saga merge algorithm is called "saga:mergelayers"