Hello,
I need to migrate an FME script with PythonCaller, from FME 2016.1.3.2 to FME 2017.1.1.2, but there are differences.
The PythonCaller write to a TXT file, but the problem is not when it is writing : i tried with a print "test" : it works fine with FME 2016 and it doesn't work with FME 2016.
367 features passed into the PythonCaller :
The features with the problem are with fme_feature_type "schema" :
Is there a difference between 2016 and 2017 in PythonCallers ?
The Python Interpreter is the same (2.7).
Here is the Python Script (I simplified the script with only elements causing problems)
:
# -*- coding:utf-8 -*-
import fme
import fmeobjects
import os
import unicodedata
from datetime import date
from datetime import datetime
# Template Function interface:
def processFeature(feature):
pass
# Template Class Interface:
class FeatureProcessor(object):
def __init__(self):
self.countfeatures = 0
self.err_structure = ""
def input(self,feature):
self.countfeatures += 1
self.pyoutput(feature)
if feature.getAttribute('_count_structure') >= '1' :
if feature.getAttribute('_count_structure') == '1' :
print "TEST"
def close(self):
pass
Thanks.
Best answer by david_r
View original