I have a pythoncaller, that runs the below python, this works OK in FME 2018, but fails in 2020.
ERROR |Python Exception <SyntaxError>: invalid syntax (<string>, line 11)
FATAL |Factory proxy not initialized
I have the python interpreter set to 3.6+
So the script works in 2020 if I tag out the last line, so has something changed with the feature.removeAttribute function ?
import fmeobjects
def removeNulls(feature):
attrsin = feature.getAttribute('SRC_ATTRS')
attrs = attrsin.split(',')
for attr in attrs:
val = feature.getAttribute(attr)
if val == 'VCP' :
feature.setAttribute('attname',attr)
if val <> 'VCP' :
feature.removeAttribute(attr)