Published Service can't find workspace

554
2
Jump to solution
03-13-2017 04:03 PM
EliseJackson
New Contributor

I have a published service that was able to publish successfully, however when I try to run it locally it says that the output workspace does not exist.  In my Python script, I establish my parameters and define my workspace as follows:

scriptPath = sys.path[0]
toolDataPath = os.path.join(scriptPath, 'ToolData')
arcpy.env.snapRaster = os.path.join(toolDataPath, 'demfill')
arcpy.env.outputCoordinateSystem = arcpy.SpatialReference('NAD 1983 UTM ZONE 19N')
arcpy.env.scratchWorkspace=os.path.join(toolDataPath,'Scratch\Scratch.gdb')

However when I try to run my service I get the following errors:

Any idea on how to fix this?  

Thank you!

0 Kudos
1 Solution

Accepted Solutions
NeilAyres
MVP Frequent Contributor

Yes, it will publish sucessfully, but once on the server the path between the script and the scratch gdb will not exist.

Rather use env.scratchGDB as the home for the data.

View solution in original post

0 Kudos
2 Replies
NeilAyres
MVP Frequent Contributor

Yes, it will publish sucessfully, but once on the server the path between the script and the scratch gdb will not exist.

Rather use env.scratchGDB as the home for the data.

0 Kudos
EliseJackson
New Contributor

That fixed it.  Thanks for your help!

0 Kudos