Skip to main content
Solved

Why with a Startup python script work in workbench but not in FME SErver

  • November 26, 2019
  • 6 replies
  • 24 views

billybob
Contributor
Forum|alt.badge.img+6

I have a a startup python script that will execute in workbench, but after being published to fme server fails when connecting to the SDE workspace. See image below. Any ideas why this might occur?

Thanks,

Frank

Here is the startup python script which executes in workbench and not in fme server:

# Name: DisableEditorTracking.py

# Description: Disables editor tracking on a feature class.

 

# Import modules

import os, arcpy

 

# Local variables:

TrackingFeature = "GIS.address"

 

# disconnect users

admin_workspace = r"C:\\Users\\Administrator\\AppData\\Roaming\\ESRI\\Desktop10.7\\ArcCatalog\\SQLDEV_sde_wilco.sde"

arcpy.DisconnectUser(admin_workspace, "ALL")

 

# assign workspace environment

workspace = r"C:\\Users\\Administrator\\AppData\\Roaming\\ESRI\\Desktop10.7\\ArcCatalog\\SQLDEV_gis_wilco.sde"

arcpy.env.workspace = workspace

 

# Disable Editor Tracking

arcpy.DisableEditorTracking_management(TrackingFeature,

"NO_DISABLE_CREATOR",

"NO_DISABLE_CREATION_DATE",

"DISABLE_LAST_EDITOR",

"DISABLE_LAST_EDIT_DATE")

Best answer by david_r

And does the service user that's running the FME Server Engines service have the necessary access rights to this file? I'm asking since it's located in a user profile, which by default is private.

Perhaps try moving the .sde connection file to somehwere "neutral" like c:\\temp and see if that makes a difference.

View original
Did this help you find an answer to your question?

6 replies

david_r
Celebrity
  • November 26, 2019

Does the following file exist on the machine running FME Server?

C:\Users\Administrator\AppData\Roaming\ESRI\Desktop10.7\ArcCatalog\SQLDEV_gis_wilco.sde

billybob
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • November 26, 2019
david_r wrote:

Does the following file exist on the machine running FME Server?

C:\Users\Administrator\AppData\Roaming\ESRI\Desktop10.7\ArcCatalog\SQLDEV_gis_wilco.sde

Yes, it does. ArcGIS Desktop 10.7.1 is installed on the server running FME server, and both the connection files shown in the script are available.  


david_r
Celebrity
  • Best Answer
  • November 26, 2019

And does the service user that's running the FME Server Engines service have the necessary access rights to this file? I'm asking since it's located in a user profile, which by default is private.

Perhaps try moving the .sde connection file to somehwere "neutral" like c:\\temp and see if that makes a difference.


david_r
Celebrity
  • November 26, 2019
billybob wrote:

Yes, it does. ArcGIS Desktop 10.7.1 is installed on the server running FME server, and both the connection files shown in the script are available.

And does the service user that's running the FME Server Engines service have the necessary access rights to this file? I'm asking since it's located in a user profile, which by default is private.

Perhaps try moving the .sde connection file to somehwere "neutral" like c:\\temp and see if that makes a difference.


billybob
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • November 26, 2019

So, two things. Sorry, I probably wasn't clear, but the startup script executes without an error when run in workbench on the same server that has fme server installed. It access the same location for the .sde connection file. The other is that this workspace has executed correctly for about a month, but now is failing. I'm using FME Server 2019.1.3.1 (Build 19643).


billybob
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • November 27, 2019
david_r wrote:

And does the service user that's running the FME Server Engines service have the necessary access rights to this file? I'm asking since it's located in a user profile, which by default is private.

Perhaps try moving the .sde connection file to somehwere "neutral" like c:\\temp and see if that makes a difference.

@david_r, Your suggestion was correct. Even thought the workbench worked correctly , i move the connections to a network share drive where the FME Server has access and the scripts executed correctly! Thanks for your suggestion. I really appreciate the help!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings