ablakey

Simple Python Script as Geoprocessing Service

Discussion created by ablakey on Oct 18, 2013
Hello:

I'm trying to adapt to the changes in the lastest ArcGIS Server changes (wow has publishing services changed...) and am struggling with even the simplest script publication.

I have published a model that contained only a buffer tool, and it worked fine on my web application.  But when I clone that functionality in a python script, I get an error:

FaultEvent fault=[RPC Fault faultString="Unable to complete operation." 
faultCode="400" faultDetail=""] messageId=null type="fault" 
bubbles=false cancelable=true eventPhase=2]


My script is as follows:

import arcpy

point = arcpy.GetParameterAsText(0)
output = arcpy.GetParameterAsText(1)

arcpy.Buffer_analysis(point, output, 50) 



Sometimes I get an error that talks about "Workspace cannot be established." or something close to that.


What am I doing wrong?
Are there any resources that provide full, complete examples of building a python script and publishing it as a GP Service on ArcGIS Server?   Usually I start from there and make baby steps into making my code more complex.

Thanks!

Outcomes