Bug report #17168

Boolean columns trigger Python errors in Refactor Fields processing algorithm

Added by Andreas Neumann over 2 years ago. Updated over 2 years ago.

Status:Closed
Priority:Normal
Assignee:Matthias Kuhn
Category:Processing/QGIS
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:25067

Description

When using the "Refactor Fields" processing algorithm and the attribute data contains columns of type boolean, one gets Python errors:

File /usr/local/share/qgis/python/plugins/processing/algs/qgis/ui/FieldsMappingPanel.py" line, in data
return self.fieldTypes[value]
KeyError: 1

Apparently,

(QVariant.Bool, "Boolean"),

has to be added to the fieldType OrderedDict.

Associated revisions

Revision ee8ef42c
Added by Alexander Bruy over 2 years ago

[processing] boolean fieds support in the Refactor Fields algorithm (fix #17168)

History

#1 Updated by Giovanni Manghi over 2 years ago

  • Status changed from Open to Feedback

Does it work as expected on 2.18?

#2 Updated by Andreas Neumann over 2 years ago

The boolean data type (on the QGIS level) is new in QGIS master. It didn't exist in 2.18x

So the issue is only on master.

#3 Updated by Alexander Bruy over 2 years ago

  • % Done changed from 0 to 100
  • Status changed from Feedback to Closed

Also available in: Atom PDF