Skip to main content

When I try to run a pythoncaller within FME, every time I hit run, it generates an error, where it inserts a single quote (') at the first line of code. the quote does not exist. please help,

screenshot included below of the error:

0684Q00000ArD45QAF.png

and here is the script: (clearly no single quote existing in it)

import fme
import fme
import fmeobjects
import arcpy
import os
import sys
# 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):
    logger = fmeobjects.FMELogFile()
    logger.logMessageString("It's lo-og, lo-og.  It's big, it's heavy, it's wood!")

That quote is only part of the log file. In the pythonCaller have you changed the Class or Function to process feature parameter to processFeature (as opposed to FeatureProcessor)?


That quote is only part of the log file. In the pythonCaller have you changed the Class or Function to process feature parameter to processFeature (as opposed to FeatureProcessor)?

yes I have indeed

 

 


That quote is only part of the log file. In the pythonCaller have you changed the Class or Function to process feature parameter to processFeature (as opposed to FeatureProcessor)?

That's my guess too, 'need to call the function not the class, but it's very interesting arcpy is in the picture, will you be working with JSON feature representations?

 

 


Hi @skischkel, as @jdh mentioned, the log file just quotes the script that raised an error with single quotations. Some messages describing reason for the error also should have been logged there. We cannot even imagine what happened unless you post the error messages.


With that script, only import the fme and fmeobjects package. That should work fine?


Reply