Hi,
I created a simple GP and published as GP service, i executed the service using submit job, but nothing happen's
import arcpy
try:
arcpy.env.overwriteOutput = True
arcpy.env.workspace = "C:\\geometry\\test.gdb"
polygonFC = "drawPoly"
eraseFC = "testFC"
outFC = "outFC"
singlePart ="outputSP"
arcpy.Erase_analysis(polygonFC,eraseFC,outFC)
arcpy.MultipartToSinglepart_management(outFC,singlePart)
except:
error = arcpy.GetMessages()
where am i'm i going wrong.
My first check would be to see if the "C:\\geometry\\test.gdb" workspace exist on the ArcGIS Server machine. You may want to consider using a scratch or in_memory workspace instead.
Hi,
Actually registered the folder while publishing the GP service.
it might be useful to add a statement to print something.. as it stands right now any errors will be collected in your except block but not reported (ie add print(error) or arcpy.AddMessage(error) which ever is appropriate)
Hi,
actually the tool works fine locally, when i create the GP service it shows and try to use submit job.
it shows job is successfully executed, but not data is created in my gdb.
About registering your data with ArcGIS Server—Documentation (10.3 and 10.3.1) | ArcGIS for Server
"Registering your data does not grant the ArcGIS Server account permissions to access your data. Before registering your data, you'll need to ensure that the ArcGIS Server account has at least read permissions to the data stored in folders, in databases, or in enterprise or workgroup geodatabases that are accessed using operating system authentication. To learn more about this process, see Make your data accessible to ArcGIS Server."
Hi James,
I've all the persmssions required. works fine when i run the same script locally.
When publiched, i can see the status as succeeded, but no changes happen in the output feature when run through GP Service.
Are there any messages in the logs of ArcGIS for Server?
no. no logs.
here is my code, do i have to import other modules?
import arcpy
# Local variables:
MinesIP_shp = "C:\\test\\IP.shp"
ExistingMines_shp = "C:\\test\\Existing.shp"
EraseFC_shp = "%scratchworkspace%/EraseFC.shp"
EraseSFC_shp = "C:\\test\\EraseSFC.shp"
# Process: Erase
arcpy.Erase_analysis(MinesIP_shp, ExistingMines_shp, EraseFC_shp, "")
# Process: Multipart To Singlepart
arcpy.MultipartToSinglepart_management(EraseFC_shp, EraseSFC_shp)
when i run the tool from catalog runs fine.
the same is published, no error no info. nothing
tried with both submitJob, Execute.
no. no logs.
here is my code, do i have to import other modules?
import arcpy
# Local variables:
MinesIP_shp = "C:\\test\\IP.shp"
ExistingMines_shp = "C:\\test\\Existing.shp"
EraseFC_shp = "%scratchworkspace%/EraseFC.shp"
EraseSFC_shp = "C:\\test\\EraseSFC.shp"
# Process: Erase
arcpy.Erase_analysis(MinesIP_shp, ExistingMines_shp, EraseFC_shp, "")
# Process: Multipart To Singlepart
arcpy.MultipartToSinglepart_management(EraseFC_shp, EraseSFC_shp)
when i run the tool from catalog runs fine.
the same is published, no error no info. nothing
tried with both submitJob, Execute.