Skip to main content
Question

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

  • February 8, 2022
  • 7 replies
  • 277 views

Forum|alt.badge.img

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

Forum|alt.badge.img
  • Author
  • February 8, 2022

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


nielsgerrits
VIP
Forum|alt.badge.img+54

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.


Forum|alt.badge.img
  • Author
  • February 8, 2022
nielsgerrits wrote:

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.

 


Forum|alt.badge.img
  • Author
  • February 8, 2022
nielsgerrits wrote:

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 


nielsgerrits
VIP
Forum|alt.badge.img+54
viplove555 wrote:

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.


nielsgerrits
VIP
Forum|alt.badge.img+54
viplove555 wrote:

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

Sample workspace attached.


Forum|alt.badge.img
  • Author
  • February 8, 2022
viplove555 wrote:

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.


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