Good Day,
I am working on a custom arcpy toolbox. My tool keeps running and showing 'Updating' even after the code is executed completely and successfully till the last line.
Is there any procedure to properly terminate code in such arcpy scripts.
Any advice will be much appreciated.
Thank you in advance
what does your code do?
How does it increment and do you reset it when it reaches the end of the cycle?
SetProgressor—ArcGIS Pro | Documentation
The "Updating..." progressor state isn't controlled by Progressor calls from arcpy. It's usually done when progress state isn't implemented in a geoprocessing tool/function call or when the ArcGISPro thread takes over from the script to preform cleanup. I've seen it hang when making lots of edits and lock files get out of sync in file geodatabases.
Usually by the time you see this the actual script completed successfully, but the thread running the python tool remains locked for some reason.
I've noticed that this tends to happen when you run an arcpy tool function. I believe that the handling of those calls is passed on to a different thread as those directly run tools written in C# or Java.
You could always try interrupting by raising an Exception then immediately catching that exception to exit the execute() call.
Without seeing the call that's causing the Updating hangup it's hard to tell though.