Skip to main content
Hi,

 

 

I have FME 2014 SP1 (32 bits) and ArcGIS 10.2 (32 bits) installed on a Windows7 64 bits.

 

 

I have the following code that I am trying to read into the Shutdown Python Script : 

 

 

 import sys import arcpy output_location = "\\\\MYSERVER\\MYGDB.gdb" arcpy.CreateRelationshipClass_management(output_location+"\\DATASET\\LAYER", output_location+"\\TABLE", output_location+"\\DATASET\\rRelation", "SIMPLE", "TABLE", "LAYER", "NONE", "ONE_TO_MANY", "NONE", "FKEY", "PKEY")
 My problem is that I get this error : Python Exception <ImportError>: No module named arcpy

 

 

I tried to add environment variables in PYTHON and Path as described here : http://fmepedia.safe.com/articles/Samples_and_Demos/Using-a-Python-Startup-Shutdown-Script-to-Perform-Geoprocessing-with-Arcpy#heading_toc_j_5

 

 

I tried several solutions from here : http://stackoverflow.com/questions/3701646/how-to-add-to-the-pythonpath-in-windows-7/4855685#4855685

 

 

I just can't find the way to make this working in FME. My script is working perfectly in ArcGIS.

 

 

Thank you! 
Hi,

 

 

the problem is that FME is using its own Python interpreter and not the one installed with ArcGIS. You will have to set the FME Python interpreter to the one installed with ArcGIS, as outlined here (http://fmepedia.safe.com/articles/How_To/Choosing-a-different-Python-Interpreter-installation).

 

 

David
WOW thanks a lot!! It is working perfectly. My morning starts great because of you.

 

 

Safe should update the documentation from the first link I put on my post though...

Reply