Skip to main content

I created a workspace using FME 2016.0 or older that contains a python script that uses arcpy to connect to an SDE Geodatabase. But now if I try to run that same workspace using FME 2016.1, the script is either throwing an error or not working as expected. I can run that same python script with Python outside of FME without a problem.

This problem has been fixed in FME 2017, so those scripts should all work fine when run using the newest version of FME.

In FME 2016.1, a change was made that causes FME to move it's own python library directories to the front of the python path. This can cause trouble with running python scripts in some scenarios, specifically when using arcpy to connect to an SDE Geodatabase. To work around this problem, add the following lines to your Python script before your import arcpy statement: 

import sys  sys.path.append(sys.path.pop(0))  sys.path.append(sys.path.pop(0))

This will move the FME python paths to the end of the path instead.


Reply