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
Answer
I found that when I reverting back to arcgisscripting (instead of arcpy), the gp service works fine...
My code in this script is pretty vanilla - scraped almost entirely from ESRI site, so I have no idea what could be causing the problem.
No comments:
Post a Comment