Invalid scripts from models with intermediate vector outputs #22945
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Processing
Relating to QGIS Processing framework or individual Processing algorithms
Milestone
Author Name: Apus Systems - (Apus Systems -)
Original Redmine Issue: 14998
Affected QGIS version: 2.14.3
Redmine category:processing/modeller
Assignee: Victor Olaya
When exporting a model as script, vector outputs from intermediate algorithms appear as None parameter in corresponding processing.runalg call.
Here is the exported script:
@##Save Selection=name
##input=vector
##selection=output vector
outputs_QGISSELECTBYEXPRESSION_1=processing.runalg('qgis:selectbyexpression', input,'TRUE',0,None)
outputs_QGISSAVESELECTEDFEATURES_1=processing.runalg('qgis:saveselectedfeatures', outputs_QGISSELECTBYEXPRESSION_1['RESULT'],selection)@
This however causes the script to fail, because algorithm 'qgis:selectbyexpression' does not need an output parameter in its .runalg call.
Here is the Console Message after running the script:
@error: Wrong number of parameters
ALGORITHM: Select by expression
LAYERNAME
EXPRESSION
METHOD
RESULT @
After having manually deleted the output parameter 'None', everything works as expected.
We experience the same issue with the following algorithms:
'qgis:selectbyattribute'
'qgis:selectbylocation'
as well as algorithms from user scripts.
QGIS 2.14.3
Python 2.7.9
Qt 4.8.6
The text was updated successfully, but these errors were encountered: