Bug report #13013
Custom function accepted in 2.8 is invalid in Master
|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 #:||21089|
I have created a custom function ($compta) within the new Function Editor in QGIS 2.8.
@qgsfunction(args=0, group='Custom') def compta(value1, feature, parent): nb = 0 for idx in range(len(feature.attributes())): attr = feature.attributes()[idx] if not attr == NULL : nb = nb +1 return nb
In master, when tring to use this function, I get an error
Special column is not known
No root node! Parsing failed?
#1 Updated by Salvatore Larosa over 5 years ago
it is occurring because you are running the function from Recent list which has stored it with the $ char in 2.8 version.
in master version that char is not added to the function anymore (it was removed since e6403da)
the workaround here is re-run the function and choose it from Custom list.