I have added a script via the modeler. When executing the same code in the script, the layers are no longer added with the specified names in QGIS but with the name of tool that was automated. Previously in the Modeler the generated layers were added with the set names.

Does anyone know what the problem is?

Example: Previously the layer was added under the name "step2". Run in the model, it's named "intersection":

alg_params = {
    'INPUT': parameters['Flurstuecke'],
    'INPUT_FIELDS': [''],
    'OVERLAY': outputs['step1']['OUTPUT'],
    'OVERLAY_FIELDS': [''],
    'OUTPUT': parameters['step2']
outputs['DivideIntoParcelsStructure'] = processing.run('native:intersection', alg_params, context=context, feedback=feedback, is_child_algorithm=True)
results['step2'] = outputs['DivideIntoParcelsStructure']['OUTPUT']

1 Answer 1


I figured out that it seems to work only when running inside the graphical moduliere and when the python script is exported, then the layers must be saved so that a name appears after running. A save path could be set in the script so it works automatically

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.