Skip to main content
Question

PythonFactory failed to load python symbol `FeatureProcessor'

  • May 18, 2021
  • 6 replies
  • 582 views

Greetings,

I have selected the Esri ArcGIS Python 3.7 option, in Translation.

I am getting a Python symbol error??

Any ideas how to resolve this issue??

 

The error msg is:

PythonFactory failed to load python symbol `FeatureProcessor'
Factory proxy not initialized
PythonCaller_2 (PythonFactory): PythonFactory failed to process feature
PythonCaller_2 (PythonFactory): A fatal error has occurred. 

Regards,

Clive

 

 

 

6 replies

david_r
Celebrity
  • 8391 replies
  • May 18, 2021

Check that the Python code in your PythonCaller or PythonCreator has either a function or a class with the name "FeatureProcessor" (case sensitive).


  • Author
  • 3 replies
  • May 18, 2021

Check that the Python code in your PythonCaller or PythonCreator has either a function or a class with the name "FeatureProcessor" (case sensitive).

Hi David,

This code used to work, it is suddenly throwing an error.

Regards,

Clive

import fme
 import fmeobjects
 import requests
 
 def processFeature(feature):
 
   resp = requests.post(FME_MacroValues['PortalURL']+"/Portal/sharing/rest/generateToken?f=pjson&client=referer&expiration=60", data={"username":FME_MacroValues['UserName'], "password":FME_MacroValues['password'], "referer":FME_MacroValues['PortalURL']+"/server/rest"})
 
   feature.setAttribute("response", str(resp.json()))

 


  • Author
  • 3 replies
  • May 18, 2021

I finally figured out what was throwing the error.

The class to process, had a type...

😨 Seriously

 


david_r
Celebrity
  • 8391 replies
  • May 18, 2021

I finally figured out what was throwing the error.

The class to process, had a type...

😨 Seriously

 

That's the most common reason for this error message, indeed :-)


harmen
Contributor
Forum|alt.badge.img+10
  • Contributor
  • 11 replies
  • November 24, 2022

I finally figured out what was throwing the error.

The class to process, had a type...

😨 Seriously

 

@clives-bmh​ : I'm pretty new to Python and got the same error.

Can you explain / show what you mean with "The class to process, had a type' ?

Thanks!

 

(maybe @david_r​ , you can explain it?)


david_r
Celebrity
  • 8391 replies
  • November 24, 2022

@clives-bmh​ : I'm pretty new to Python and got the same error.

Can you explain / show what you mean with "The class to process, had a type' ?

Thanks!

 

(maybe @david_r​ , you can explain it?)

Can you please post a screenshot of the PythonCaller configuration.