Bug report #15743

Processing: errors in underlying commands are not handled gracefully by iterations

Added by Paolo Cavallini almost 4 years ago. Updated almost 4 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Victor Olaya
Category:Processing/Core
Affected QGIS version:2.16.3 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:23665

Description

When a command has an error, and is ran as iterative, the underlying error is not handled gracefully, and returns:

Traceback (most recent call last):
              File "/usr/share/qgis/python/plugins/processing/gui/AlgorithmDialog.py", line 238, in accept
                if runalgIterating(self.alg, self.iterateParam, self):
              File "/usr/share/qgis/python/plugins/processing/gui/AlgorithmExecutor.py", line 90, in runalgIterating
                if runalg(alg):
              File "/usr/share/qgis/python/plugins/processing/gui/AlgorithmExecutor.py", line 52, in runalg
                progress.error(e.msg)
            AttributeError: 'NoneType' object has no attribute 'error'

See example in:

https://github.com/qgis/QGIS-Training-Data/tree/master/training_manual_data/processing/iterative

History

#1 Updated by Victor Olaya almost 4 years ago

this is fixed in master

#b4562d143e6ef140e14b0cb9625ef923412db793

Looks like it is not backported...

#2 Updated by Paolo Cavallini almost 4 years ago

Thanks. IMHO it is useful to backport it both to 2.14 and to 2.16 series.

#3 Updated by Paolo Cavallini almost 4 years ago

  • Priority changed from Normal to High

Unsure whether it is the same error. Also running `SAGA:Clip raster with polygon` runs fine without iterative, but fails when iterating, with:

Traceback (most recent call last):
              File "/usr/share/qgis/python/plugins/processing/gui/AlgorithmDialog.py", line 238, in accept
                if runalgIterating(self.alg, self.iterateParam, self):
              File "/usr/share/qgis/python/plugins/processing/gui/AlgorithmExecutor.py", line 90, in runalgIterating
                if runalg(alg):
              File "/usr/share/qgis/python/plugins/processing/gui/AlgorithmExecutor.py", line 52, in runalg
                progress.error(e.msg)
            AttributeError: 'NoneType' object has no attribute 'error'

#4 Updated by Paolo Cavallini almost 4 years ago

  • Priority changed from High to Severe/Regression

AFAICT iterating is broken now in 2.16, so I raise the severity.

#5 Updated by Paolo Cavallini almost 4 years ago

in 2.18, no error is displayed, even when layers are not created.

#6 Updated by Alexander Bruy almost 4 years ago

If I understand correctly 2.16 will not receive updates anymore, so there is no sense to backport anything to it

#7 Updated by Paolo Cavallini almost 4 years ago

  • Status changed from Open to Closed

Agreed.

Also available in: Atom PDF