Skip to content


Browse files Browse the repository at this point in the history
Don't throw python exception when modeler algorithm is missing inputs
Instead use nicer messagebar for feedback. Also fix untranslatable

Refs #17028
  • Loading branch information
nyalldawson committed Aug 22, 2017
1 parent 367aba7 commit cdbb57d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions python/plugins/processing/modeler/
Expand Up @@ -303,7 +303,13 @@ def createAlgorithm(self):
for param in self._alg.parameterDefinitions():
if param.isDestination() or param.flags() & QgsProcessingParameterDefinition.FlagHidden:
val = self.wrappers[].value()
val = self.wrappers[].value()
except InvalidParameterValue:"Error"),"Wrong or missing value for parameter '{}'").format(param.description()),
return None

if isinstance(val, QgsProcessingModelChildParameterSource):
val = [val]
elif not (isinstance(val, list) and all([isinstance(subval, QgsProcessingModelChildParameterSource) for subval in val])):
Expand All @@ -313,7 +319,7 @@ def createAlgorithm(self):
subval.source() == QgsProcessingModelChildParameterSource.StaticValue and
not param.checkValueIsAcceptable(subval.staticValue())) \
or (subval is None and not param.flags() & QgsProcessingParameterDefinition.FlagOptional):"Error", "Wrong or missing value for parameter '%s'" % param.description(),"Error"),"Wrong or missing value for parameter '{}'").format(param.description()),
return None
alg.addParameterSources(, val)
Expand Down

0 comments on commit cdbb57d

Please sign in to comment.