Skip to main content
Question

PythonCaller ArcPy 'FeatureProcessor' error

  • September 30, 2024
  • 2 replies
  • 42 views

d.jimenez
Contributor
Forum|alt.badge.img+3

Hi,

The below python code works in ArcGIS Pro:

But returns the below error in FME:

What would be the ‘FeatureProcessor’ python symbol?

Regards

2 replies

bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • September 30, 2024

Because in PythonCaller there needs to be a Python Class to handle each Feature being passed into the Transformer.

The blank template python code in PythonCaller has a class called “FeatureProcessor” and this has likely been overwritten by copying and pasting the above code over the top of the text.  As explained in the Python template comment text, this class must be present, even if it triggers no further Python functions or statements within the feature handling Class.

For ease of use, I would generally recommend keeping the template Python code intact, and carefully copying and pasting the desired lines of text into the relevant template Classes (they are all commented with when they are called by the Transformer), and not overwrite the template structure.


d.jimenez
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • October 1, 2024

Thanks, leaving the blank template in the PythonCaller and copy-pasting under the “FeatureProcessor” section did work


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings