ArcGIS Pro - Python toolbox tools take a long time to run

5080
12
Jump to solution
12-08-2015 12:12 PM
JeremyBracone
New Contributor II

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.

1 Solution

Accepted Solutions
JeremyBracone
New Contributor II

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.

View solution in original post

12 Replies
DanPatterson_Retired
MVP Emeritus

I haven't had this issue when

  • using a local install and a single use license
  • running with source and destination data on local machines
  • I manually updated python 2.7.x script to 3.4.x
  • I used a conventional toolbox

Not much help, but no speed issues in those circumstances, so at least you have the opportunity to narrow down the culprit.

0 Kudos
MichaelVolz
Esteemed Contributor

Did you use the same Desktop python script in Pro?  Or did you need to make some tweaks to deal with the python version difference?

0 Kudos
JeremyBracone
New Contributor II

This was exactly the same python tool from a python toolbox in both versions.  There was nothing that wasn't Python 3 compatible in the original python tool.

If I make a new python toolbox in Pro and run the default tool without any edits, parameters, or real code to run, I get the same behavior where it gets stuck after it completes and the geoprocessing dialog perpetually says "Updating...".

I get this problem with a default script tool in a conventional toolbox and with python toolboxes.  The tool messages state that it completed...ArcPro seems to not to realize it.

0 Kudos
MichaelVolz
Esteemed Contributor

Sounds like you need to open a support incident

0 Kudos
DanPatterson_Retired
MVP Emeritus

so that leaves your installation from my list.  Does the same behaviour appear if logged in to your machine as a different user?

0 Kudos
JeremyBracone
New Contributor II

Logging in as a different user is my next test step.  I have a colleague who has no issues running gp tools on their machine and will be testing their login on mine.

Are there account settings an admin can set that affects a user's ability to use custom geoprocessing tools?

0 Kudos
DanPatterson_Retired
MVP Emeritus

I am the admin on my own machine so I wouldn't know since I don't let anyone else use my machine.  If you aren't the admin, then you would have to check with them.  You can reset your application profile as a last resort...after backing up 'stuff'

Resetting your ArcGIS application profile

0 Kudos
JeremyBracone
New Contributor II

The problem seems isolated to my machines.  I guess this means I might need to try resetting my application profile and as a last resort, reinstalling ArcGIS Pro to try to resolve the issue.

Thanks for everyone that provided feedback.

0 Kudos
BruceHarold
Esri Regular Contributor

Hi, from the WAG department, go to the backstage and set Options>Geoprocessing 'Analyze script and model tools for ArcGIS Pro compatibility' to off.  I have achieved faster startup times with this.