Skip to main content
Solved

PythonCaller Failed 'FeatureProcessor' error with ArcPy


galigis
Enthusiast
Forum|alt.badge.img+16

Hi All,

Quick question in regards FME & ArcPy: I have been able to create a Python script that overwrites a ‘tree_ID’ field on AGOL based on the sum count of the three geometries (point, line and polygon). Basically the script does the following calculation and assigns the IDs, example below:

Point = 3 features

Line = 2 features

Polygon = 2 features

TOTAL = 7 features 


ID to update on AGOL 1,2,3,4,5,6 and 7

The python works fine as the AGOL feature hosted layers have been updated with the new ‘tree_ID’ but the PythonCaller stops with the following error: ‘PythonFactory failed to load python symbol `FeatureProcessor'. An outdated FME packaged transformer may be in use. Please check Tools > FME Options > FME Packages to confirm that all FME Packages are up to date’
 

I can always run it on Pro but wanted to integrate it using PythonCaller as part of my workflow runs on FME,

Any idea why I’m getting that error?

PD: Python script attached.

Best answer by nielsgerrits

I’m by no means a specialist in this field, but you will get this error as long as you do not put your code within the class “FeatureProcessor” as the sample is created when opening a new, default PythonCaller.

View original
Did this help you find an answer to your question?

3 replies

nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • April 2, 2024

I’m by no means a specialist in this field, but you will get this error as long as you do not put your code within the class “FeatureProcessor” as the sample is created when opening a new, default PythonCaller.


galigis
Enthusiast
Forum|alt.badge.img+16
  • Author
  • Enthusiast
  • April 2, 2024

Thanks @nielsgerrits your guidance has helped a lot! Issue has been fixed now after adding the class “FeatureProcessor” and define ‘__init__’ and ‘input’.

I have attached the final Python codes for completeness in the case someone else faces the same issue in the future!


nielsgerrits
VIP
Forum|alt.badge.img+54

Cheers :)


Reply


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