Add Messages to Geoprocessing Service

2242
5
12-20-2017 06:11 AM
mpboyle
Occasional Contributor III

I have a geoprocessing service that outputs a file.  Part of the python script includes adding messages (arcpy.AddMessage) to communicate to the user what's going on.  However, these messages don't come across when the tool is run as a geoprocessing service.

Is there any way to add messages to a geoprocessing service...?

System info:

  • ArcGIS Enterprise 10.5.1
  • ArcGIS Server Advanced
  • Windows Server 2012 R2
0 Kudos
5 Replies
JonathanQuinn
Esri Notable Contributor

You can increase the messaging level of the service through Manager after it's published, or the service editor prior to publishing:

mpboyle
Occasional Contributor III

Thanks, this is what I was looking for!

0 Kudos
adminCentlec
New Contributor III

Hi there..

 

Does this work? I have tried it on my tool, saved and restarted the geoprocessing tool but the messages are still not showing. I used the arcpy.AddMessage function and then select "Info" in the Message level box.  

0 Kudos
SailiTang_HW
New Contributor II

Hi,

I am using arcpy.AddError function and then select "Error" in the Message level box. It works for me.

0 Kudos
adminCentlec
New Contributor III

Thanks, I finally got some information returned but it only apppears for a split second and then it is removed once the tool is complete. Isn't there a way to write to the output pane of the GP tool using arcpy messaging levels? 

 

0 Kudos