Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid scripts from models with intermediate vector outputs #22945

Closed
qgib opened this issue Jun 10, 2016 · 1 comment
Closed

Invalid scripts from models with intermediate vector outputs #22945

qgib opened this issue Jun 10, 2016 · 1 comment
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

Comments

@qgib
Copy link
Contributor

qgib commented Jun 10, 2016

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

@qgib
Copy link
Contributor Author

qgib commented Oct 4, 2016

Author Name: Victor Olaya (@volaya)


Fixed in changeset "421251abde27b2161bb18a737e1fca0f4cbd6f8a".


  • status_id was changed from Open to Closed

@qgib qgib added 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 labels May 25, 2019
@qgib qgib added this to the Future Release - Lower Priority milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant