Bug report #17421
processing: adding refactor fields alg into a model throws an error
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Nyall Dawson | ||
Category: | Processing/Core | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 25318 |
Description
When trying to add refactor fields to a model, the following error is thrown at the user:
An error has occurred while executing Python code: processing.gui.wrappers.InvalidParameterValue Traceback (most recent call last): File "/home/webmaster/apps/share/qgis/python/plugins/processing/modeler/ModelerDialog.py", line 584, in addAlgorithm self._addAlgorithm(alg) File "/home/webmaster/apps/share/qgis/python/plugins/processing/modeler/ModelerDialog.py", line 593, in _addAlgorithm dlg = ModelerParametersDialog(alg, self.model) File "/home/webmaster/apps/share/qgis/python/plugins/processing/modeler/ModelerParametersDialog.py", line 77, in __init__ self.setupUi() File "/home/webmaster/apps/share/qgis/python/plugins/processing/modeler/ModelerParametersDialog.py", line 206, in setupUi wrapper.postInitialize(list(self.wrappers.values())) File "/home/webmaster/apps/share/qgis/python/plugins/processing/algs/qgis/ui/FieldsMappingPanel.py", line 480, in postInitialize self.setLayer(wrapper.value()) File "/home/webmaster/apps/share/qgis/python/plugins/processing/gui/wrappers.py", line 1013, in value return self.comboValue(validator, combobox=self.combo) File "/home/webmaster/apps/share/qgis/python/plugins/processing/gui/wrappers.py", line 170, in comboValue raise InvalidParameterValue() processing.gui.wrappers.InvalidParameterValue
Associated revisions
[processing] fix error when adding refactor fields alg in empty model
(fixes #17421)
History
#1 Updated by Giovanni Manghi about 7 years ago
- Status changed from Open to Feedback
I cna't confirm this on master/osgeo4w. Anyway I have seen this (once) when trying to edit the refactor field alg already added to a model
Traceback (most recent call last):
File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\processing\algs\qgis\ui\FieldsMappingPanel.py", line 144, in rowCount
return self._mapping.__len__()
AttributeError: 'NoneType' object has no attribute '__len__'
#2 Updated by Andreas Neumann about 7 years ago
@Matthieu - I just tested with a recent master and it seems to work ok. I have other issues with expression context - Matthias is working on it - but other than that I can run a model with a "Feature Source" and connect it to the "Refactor Fields" algorithm.
#3 Updated by Mathieu Pellerin - nIRV about 7 years ago
- Assignee changed from Victor Olaya to Nyall Dawson
- Status changed from Feedback to Open
Sorry, I should have mentioned that the error occurs when the algorithm is added in an empty modeler (i.e. no feature source / vector layer input yet)
Steps to reproduce- Create a new model
- Add the refactor fields algorithm
- You'll get thrown an error stack
#4 Updated by Mathieu Pellerin - nIRV about 7 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|97f749e6b41338da0e1ee508e2634f5760be966c.
#5 Updated by Giovanni Manghi about 7 years ago
- Resolution set to fixed/implemented