I have an old but simple workspace with one private parameter defined as
return FME_MacroValues['pEvent_Attributes'].replace(',',' ') + ' ' + FME_MacroValues['pEvent_Route_ID']
When I dug it up and run it under 2019.1.2.0 (20190829 - Build 19630 - linux-x64), it failed with the following msg:
Python version 3.6 loaded successfully
Traceback (most recent call last):
File "<string>", line 5, in MF_Include_1574806112377
File "<string>", line 4, in ParamFunc
KeyError: 'LRS_EventMerger_pEvent_Attributes'
INCLUDE -- failed to evaluate Python script `def ParamFunc():
return
FME_MacroValues[FME_MacroValues['LRS_EventMerger_WORKSPACE_NAME'] + '_' +
'pEvent_Attributes'].replace(',',' ') + ' ' +
FME_MacroValues[FME_MacroValues['LRS_EventMerger_WORKSPACE_NAME'] + '_' +
'pEvent_Route_ID']
value = ParamFunc()
macroName = FME_MacroValues['LRS_EventMerger_WORKSPACE_NAME'] + '_pAttributes_Merge'
if value == None:
return { macroName : u'' }
else:
import six
try:
value = six.text_type(value)
except UnicodeDecodeError:
value = six.text_type(value, 'utf-8')
return { macroName : value }
'
Program Terminating
Translation FAILED.
I would like to know how I may fix this with the 3.x Python instead of using Python 2.7 Thanks for any comments.
Bo