I'm using a PythonCaller to derive a database instance string to be used to populate an attribute.  The caller works fine until I introduce a python script derived private parameter which outputs an sde connection string.  The string works if I plug it directly into a reader, but fails if I use it as a macro value in the Python Caller.  The error references a dll but I am using the correct interpreter and all my python scripts (including this one until now) are running fine otherwise.  Any thoughts? Â
Â
Thanks
Â
*note all location specific text is changed to "!@#$%"
Error snippet:
2020-09-17 13:30:18|   3.4|  0.7|ERROR |Python Exception <ImportError>: DLL load failed: The specified module could not be found.
2020-09-17 13:30:18|   3.4|  0.0|ERROR |Error executing string `import<space>arcpy<lf>import<space>fmeobjects<lf><lf><lf>#<space>Template<space>Function<space>interface:<lf>#<space>When<space>using<space>this<space>function<comma><space>make<space>sure<space>its<space>name<space>is<space>set<space>as<space>the<space>value<space>of<lf>#<space>the<space><apos>Class<space>or<space>Function<space>to<space>Process<space>Features<apos><space>transformer<space>parameter<lf>def<space>processFeature<openparen>feature<closeparen>:<lf><space><space><space><space>connFile<space>=<space>FME_MacroValues<openbracket><apos>IN_SDE<apos><closebracket><lf><space><space><space><space>desc<space>=<space>arcpy.Describe<openparen>connFile<closeparen><lf><space><space><space><space>cp<space>=<space>desc.connectionProperties<lf><space><space><space><space>database<space>=<space>cp.server<lf><space><space><space><space>feature.setAttribute<openparen><apos>origin_db<apos><comma>database<closeparen><lf><space><space><space><space>logger<space>=<space>fmeobjects.FMELogFile<openparen><closeparen><lf><space><space><space><space>if<space>FME_MacroValues<openbracket><apos>DB_ENV<apos><closebracket><space>==<space>database:<lf><space><space><space><space><space><space><space><space>logger.logMessageString<openparen><quote>Selected<space>Database:<space><quote><space>+<space>FME_MacroValues<openbracket><apos>DB_ENV<apos><closebracket><space>+<space><quote><space>|||<space>SDE<space>Database:<space><quote><space>+<space>database<space>+<space><quote><space>|||<space>Databases<space>Match!<quote><comma>1<closeparen><lf><space><space><space><space>else:<lf><space><space><space><space><space><space><space><space>logger.logMessageString<openparen><quote>Selected<space>Database:<space><quote><space>+<space>FME_MacroValues<openbracket><apos>DB_ENV<apos><closebracket><space>+<space><quote><space>|||<space>SDE<space>Database:<space><quote><space>+<space>database<space>+<space><quote><space>|||<space>Databases<space>Mismatch!<quote><comma>2<closeparen><lf><space><space><space><space><space><space><space><space>'
2020-09-17 13:30:18|   3.4|  0.0|FATAL |Factory proxy not initialized
2020-09-17 13:30:18|   3.4|  0.0|FATAL |DatabaseFinder_!@#$% (PythonFactory): PythonFactory failed to process feature
2020-09-17 13:30:18|   3.4|  0.0|ERROR |A fatal error has occurred. Check the logfile above for details
PythonCaller snippet:
import arcpy
import fmeobjects
Â
Â
# Template Function interface:
# When using this function, make sure its name is set as the value of
# the 'Class or Function to Process Features' transformer parameter
def processFeature(feature):
    connFile = FME_MacroValues,'IN_SDE']
    desc = arcpy.Describe(connFile)
    cp = desc.connectionProperties
    database = cp.server
    feature.setAttribute('origin_db',database)
    logger = fmeobjects.FMELogFile()
    if FME_MacroValuesÂ'DB_ENV'] == database:
        logger.logMessageString("Selected Database: " + FME_MacroValuesp'DB_ENV'] + " ||| SDE Database: " + database + " ||| Databases Match!",1)
    else:
        logger.logMessageString("Selected Database: " + FME_MacroValuesa'DB_ENV'] + " ||| SDE Database: " + database + " ||| Databases Mismatch!",2)
Private Parameter snippet:
import fme
import fmeobjects
Â
IN_sde = ''
Â
if FME_MacroValueso'STATE'] == '!@#$%' and FME_MacroValuess'DB_ENV'] == 'STAG':
    IN_sde = r"Z:\ConnectionFiles\!@#$%_STAG.sde"
    logger = fmeobjects.FMELogFile()
    logger.logMessageString("SDE COnnection:" + IN_sde,1)
Â
return IN_sde
Â
Â