Select to view content in your preferred language

Custom Python Toolbox Crashes Pro on 2nd Run after upgrading to 3.5

263
4
09-03-2025 08:40 AM
Labels (1)
KonradBostrom
Emerging Contributor

I've recently upgraded Pro from 3.0.3 to 3.5.2, and several of my Custom Python Toolboxes will now crash Pro if I run them a second time in a row. The tool works as expected, if I close and reopen Pro before running it again, but this isn't an issue I had on 3.0.3.

My code and input data are unchanged.

I'm curious if anyone else has experienced this behavior or has any insight into what might be causing this.

Thanks!

Tags (3)
0 Kudos
4 Replies
Robert_LeClair
Esri Esteemed Contributor

I wonder if the Python environment may need to be repaired?  You can learn more about this workflow here - Repair an environment—ArcGIS Pro | Documentation

0 Kudos
KonradBostrom
Emerging Contributor

Hi Robert,

Thanks for the suggestion! My environment manager doesn't show the 'Warning icon' for the environment, and I didn't have the option to repair it. I did try to run the toolbox twice with a new clone of the default python environment and had the same issue.

Any other suggestions?

 

0 Kudos
Robert_LeClair
Esri Esteemed Contributor

Well at least we know it's not a bad environment.  Another thing to try is to create a new Python in a new Project.  Add the old Python toolbox to the new project and copy and paste the original tool to the new toolbox.  Run the tool again.  Does ArcGIS Pro still crash?

0 Kudos
Chris_Ste
Occasional Contributor

Hi,

I'm having the same Problem: First run works, the second crashes PRO. After I reopen the project it works again for one time then crashes again.

Tried with different projects and Data, always crashes on the second run.
Tested the code again with PRO Version 3.3 and it runs several times without crashing.

There's a bug-report (BUG-000176923) on that issue, with what I can only assume is a joke as a workaround ("Use ArcGIS Pro 3.3, where the tool completes successfully.").
It specifies Windows 10 as OS, but PRO also crashes on my Windows 11 machine.


0 Kudos