Geoprocessing python tools from a python toolbox take a long time to start and then remain in the "Updating" phase after finishing for a long time (more than an hour). Even a default tool that does nothing takes a long time to run and remains in the "updating" state, sometimes not even finishing. I am running ArcGIS Pro 1.1 and am wondering what the problem might be.
This same python tool runs fine from ArcMap and also runs fine as a stand-alone script using the Python 3 interpreter.
I have had this same problem on multiple computers and had made ArcGIS Pro useless to me for running python tools.
Solved! Go to Solution.
Thanks for this tip.
We have identified what caused this behavior and will be submitting a bug report to ESRI.
There seems to be an issue with setting arcpy.env.addOutputsToMap to False in a python script tool. If that line is run in the python tool, tools will not complete after the script finishes. This behavior will persist for all geoprocessing script tools (and possibly normal gp tools) for the rest of the session.
Removing this line from all python toolboxes in the project and re-opening the project resolves the problem.
This is an older post, but I am having this issue with scripts that I run as Toolboxes. I am NOT using the arcpy.env.addOutputsToMap env at all.
I have a module that outputs time results for several tools and functions. The same tool in Arc, using only basic Python and arcpy modules, can take 2-5 times longer to run than when run from outside Arc on the same datasets.
The scripts themselves are around 1000 lines of code and contain multiple functions within one main class, as well as the "stopwatch" class and also, one "static tools" class that I use as a sort-of basic conversion calculator (get specs for a Feature Dataset; get needed standard spatial references; convert text to Bool; create a layer in-memory, etc).
What I am looking for, more than anything, is any advice or feedback that would tell me things like:
Please, do not offer things like, "store your stuff locally." I know about this. All of these test scripts are running on a Threadripper + 3080, which has access to a dedicated write-drive and reads from an nvme RAID10 array.