Bug report #19750

"To run another Processing algorithm" in Processing's ScriptTemplate.py is broken

Added by Johannes Kroeger about 6 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Processing/Core
Affected QGIS version:3.3(master) Regression?:No
Operating System: Easy fix?:Yes
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:27575

Description

https://github.com/qgis/QGIS/blob/master/python/plugins/processing/script/ScriptTemplate.py#L184

buffered_layer = processing.run("native:buffer", param={

should be

buffered_layer = processing.run("native:buffer", parameters={

otherwise you will get:

Traceback (most recent call last):
File "<string>", line 193, in processAlgorithm
TypeError: run() got an unexpected keyword argument 'param'

Execution failed after 0.02 seconds

History

#1 Updated by Giovanni Manghi about 6 years ago

  • Status changed from Open to Feedback

Can you make a pull request with the patch? thanks!

#2 Updated by Nyall Dawson about 6 years ago

  • Resolution set to fixed/implemented
  • Status changed from Feedback to Closed

#3 Updated by Johannes Kroeger about 6 years ago

Thanks Nyall! I would have wanted to sweeten up more things in the example but haven't fully understood everything yet nor had no time so far.

Also available in: Atom PDF