Using FME 2021.1.0.1
When trying to use an FME Server Parameter in a Scripted Parameter, I get this error:
-----------------------------------------------------------------------
Starting translation...
INFORM: Using Python interpreter from `C:\\Program Files\\FME2021\\fmepython38\\python38.dll' with PYTHONHOME `C:\\Program Files\\FME2021\\fmepython38'
INFORM: Python version 3.8 loaded successfully
ERROR : Python Exception <KeyError>: 'FME_DATA_REPOSITORY'
INCLUDE -- failed to evaluate Python script `def ParamFunc():
import fme
repo = fme.macroValuesu'BOB']
repo = fme.macroValuesu'FME_DATA_REPOSITORY']
if repo == "Example Name - DEV":
env = "DEV"
return env
value = ParamFunc()
macroName = 'ENV'
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.
----------------------------------------------------------------
Are FME Server Parameters populated after Published Parameters? To use published parameters in a scripted parameter, the order of them in the Navigator influences if you can use them (i.e. a published param needs to comes before the scripted parameter it is used in).
If Server params are populated after Published params, this would explain my problem. Can anyone confirm and/or provide a workaround if this is so?