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!
Solved! Go to Solution.
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.
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.
That fixed it. Thanks for your help!