I am currently using the following code to merge two vector layers together:
def append_layers(layer1, layer2, output): from processing.core.Processing import Processing Processing.initialize() import processing.tools processing.tools.general.runalg("qgis:mergevectorlayers", layer1, layer2, output) append_layers(layer1.shp, layer2.shp, output.shp)
This seems to work fine in QGIS 2.14, however it fails in 2.18.1 with the following message:
Error: Wrong number of parameters ALGORITHM: Merge vector layers
Is there something that has changed between 2.14 and 2.18? Or am i just missing something really obvious?