1

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.

1 Answers1

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"

enter image description here

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
HDunn
  • 8,626
  • 3
  • 40
  • 71