Question

How to Consume arcpy.da module in FME -2021 version using Python caller transformer @david_r

  • 8 February 2022
  • 7 replies
  • 120 views

Badge

I am attempting to use the arcpy.da in the python caller transformer in FME workbench 2021.1 build-21627 W 64 bit , ArcGISpro-2.9v installed. I am wondering if there are any suggestions to getting my workbench to successfully access the arcpy.da module. I have setup the preferred python interpreter in the FME options. If you provide any help /documentation related to the Arcpy in FME it would be highly appreciated. Also getting following error while running the FME Workbench?

 


7 replies

Badge

screenshot of error log!. Your assistance is highly appreciated!fme_log_arcpy

Userlevel 6
Badge +32

First things first. For ArcGIS Pro 2.9.x you need 2021.2 or newer. See Notes on FME and Esri Versions and Compatibility.

 

Then, in the Navigator, under Scripting, set the Python Compatibility to "Esri ArcGIS Python 3.6+".

 

The open a PythonCaller and add arcpy.da to your imports:

import fme
import fmeobjects
import arcpy.da
 
def processFeature(feature):
    pass

If this runs without error, you are good to go.

Badge

First things first. For ArcGIS Pro 2.9.x you need 2021.2 or newer. See Notes on FME and Esri Versions and Compatibility.

 

Then, in the Navigator, under Scripting, set the Python Compatibility to "Esri ArcGIS Python 3.6+".

 

The open a PythonCaller and add arcpy.da to your imports:

import fme
import fmeobjects
import arcpy.da
 
def processFeature(feature):
    pass

If this runs without error, you are good to go.

Thanks for the reply, we have tested with FME 2022.0 beta version and got the same results.

 

Badge

First things first. For ArcGIS Pro 2.9.x you need 2021.2 or newer. See Notes on FME and Esri Versions and Compatibility.

 

Then, in the Navigator, under Scripting, set the Python Compatibility to "Esri ArcGIS Python 3.6+".

 

The open a PythonCaller and add arcpy.da to your imports:

import fme
import fmeobjects
import arcpy.da
 
def processFeature(feature):
    pass

If this runs without error, you are good to go.

As you mentioned, we have tried with the mentioned parameters and results as follows.fme_log_arcpy1 

Userlevel 6
Badge +32

As you mentioned, we have tried with the mentioned parameters and results as follows.fme_log_arcpy1 

Have you tested with a simple workspace, only containing a Creator and a PythonCaller and the default code with only the import of arcpy.da added? Please make sure the error is not caused by something else.

Userlevel 6
Badge +32

As you mentioned, we have tried with the mentioned parameters and results as follows.fme_log_arcpy1 

Sample workspace attached.

Badge

As you mentioned, we have tried with the mentioned parameters and results as follows.fme_log_arcpy1 

Thanks Nielsgrreties, I've tested with sample workspace provided and there were no errors and trying to add original my code in it will do the testing.

once testing is complete i ll inform you about results. Thanks again for swift reply.

Reply