AnsweredAssumed Answered

Problem when using python/arcpy script in FME

Question asked by fmorauxesrifrance-fr-esridist Employee on Apr 4, 2017
Latest reply on Jul 1, 2017 by fmorauxesrifrance-fr-esridist



encounter a problem when using a python / arcpy script in FME, from a PythonCaller.

Some arcpy instruction does not work in FME, for example :

  • arcpy.Exists ==> return feature class does not exist ;
  • arcpy.CopyFeatures_management ==> fails with following explanation feature class does not exist.


However, in ArcGIS Desktop it works (feature class exist) :



Arcpy in ArcGIS Desktop works.


However, in python it works (feature class exist) :

Arcpy in Python.


Here is the code contained in FME :

# Import system library

import sys




# Import arcpy librairy for FME

agdArcpyPath = r'C:\Program Files (x86)\ArcGIS\Desktop10.3\arcpy'

agdBinPath=r'C:\Program Files (x86)\ArcGIS\Desktop10.3\bin'

if agdBinPathnot in sys.path:


if agdArcpyPath not in sys.path:

    sys.path.append(agdArcpyPath )

import arcpy


# Workflow 


if arcpy.Exists(fcPath): # Problem, it return False in FME

   # Execute workflow


#end if


For information here is the technical background :

  • ArcGIS Desktop 10.3.1 French
  • FME 2016.1


Has anyone ever succeeded in integrating some python/arcpy code into FME?

Do you have an idea to solve my problem?


Thank you for your help.