AnsweredAssumed Answered

arcpy.GetMessages() in Python Toolbox does not return tool executed

Question asked by MGill@jmt.com_jmt on Jan 10, 2019
Latest reply on Jan 10, 2019 by rvburton

I'm working on a Python toolbox and the function to get the geoprocessing messages doesn't seem to work as documented. I'm just using the arcpy.GetMessages() function

arcpy.AddMessage(arcpy.GetMessages())

and the result is 

Start Time: Thursday, January 10, 2019 3:21:16 PM
Succeeded at Thursday, January 10, 2019 3:21:29 PM (Elapsed Time: 12.40 seconds)

If I use the arcpy.GetMessageCount() function, it likewise returns 2 as the result. This page of message documentation says that when using the GetMessages function "the first message gives the tool executed, and the last message gives the ending and elapsed time for the tool's execution. The tool's second and last messages always give the start and end time, respectively, for the tool's execution." 

 

The part that I need, the name of the tool executed, isn't coming through. Even if I use the GetMessage function and specify the 0 index position, it still returns the start time. What am I missing?

Outcomes