I have a small and simple geoprocessing script that I am trying to expose as a geoprocessing service in ArcGIS Server 10 SP4. The script is below. Pardon the hard-coding...
With the hard-coded variables, this script runs perfectly fine in desktop. However, once published as gp service, it crashes in a bad way, like I can't even trap the error. The exact message in the GIS Server log - "Container process 6436 has crashed on machine westchamp24-pc."
A couple of potential causes I can eliminate right off the bat:
- Permissions: The entire D: drive is wide open to the 'Everyone' user
Licensing: ArcGIS Server is licensed at Enterprise level
# Check out the ArcGIS Spatial Analyst extension license arcpy.CheckOutExtension("Spatial") # Execute CostDistance outCostDistance = CostDistance("origin",SOURCE,"#","D:/RasterStuff/backlinkRaster.tif") # Execute CostPath outCostPath = CostPath("destination", outCostDistance,"D:/RasterStuff/backlinkRaster.tif") # Convert Result to Polyline arcpy.RasterToPolyline_conversion(outCostPath, "D:/RasterStuff/costPath.shp") featSet = arcpy.FeatureSet() featSet.load("in_memory/costPath") arcpy.SetParameter(0,featSet)
except: # do stuff with error print finally: print