Bug report #21116
processing.run and processing.runAndLoadResults give different output
|Affected QGIS version:||3.5(master)||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||wontfix|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||28934|
I noticed that "processing.run" and "processing.runAndLoadResults" give different output.
The first one returns a dictionary of QgsMapLayer object. The second one returns a dictionary of maplayer ID.
This is IMHO not very convenient when you develop a script, calling many sub Processing algorithm. Sometimes you want to debug quickly by checking the content of an intermediate result by adding "AndLoadResults". But then the output is different, so the script fails with an "AttributeError" if the function doesn't exist on the new returned object.
I'm not sure if it's a bug or if it was a feature.