Skip to main content
Question

Run ArcPy RepairGeometry through PythonCaller

  • 26 July 2024
  • 5 replies
  • 48 views

Hi All,

I’m testing a simple workbench to fix the geometry of a SHP thought ArcPy RepairGeometry in FME PythonCaller. Here’s is the simple code to run in FME but for reason fails:

FME_MacroValuesa'SourceDataset_SHAPEFILE']

The idea is running the script before writing the data into a GDB,

Any idea how to make it to work?

Thanks :)

5 replies

Badge +41

Please check the article No Module Named ArcPy: Importing Esri's ArcPy for Use with FME.

Userlevel 3
Badge +13

Thanks @nielsgerrits I have done the test you suggested in the following post by adding the following code in the PythonCaller but still failed. I have also changed my Python Compatibility to Esri ArcGIS Python 3.7+

import fme
import fmeobjects
import arcpy.da

def processFeature(feature):
pass

Machine specifications as follows:

  • FME(R) 2023.1.2.0 (20231110 - Build 23641 - WIN64)
  • ArcGIS Pro 3.1.0

I can’t understand why am getting the following: “ERROR : A compatible ArcGIS application could not be found or is not licensed for Python Compatibility 'Esri ArcGIS Python 3.7+”

 

Badge +41

I checked Notes on FME and Esri Versions and Compatibility but your version combination should be supported. I can’t check using you versions as our stuff is different.

Please check the parameter Esri ArcGIS Compatibility (Navigator window, Workspace Parameters, Translation). You might need to set that from auto to pro.

Have you recently opened arcgis pro on you machine? If I have similair issues I have not opened Pro in a while and I need to sign in again.

Userlevel 3
Badge +13

Thanks @nielsgerrits I have tried all the scenarios and still can’t get it to work,

ArcPro is also opened with an Advanced license

 

Badge +41

Sorry, I’m out of ideas. My Python-fu is limited and I believe it should work with these settings. Maybe @birgit has a suggestion?

Reply