Skip to main content
Question

My Python script that uses arcpy no longer runs in FME 2016.1

  • February 10, 2017
  • 1 reply
  • 19 views

fmelizard
Safer
Forum|alt.badge.img+21

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 post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

laurawatsafe
Safer
Forum|alt.badge.img+12

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.