Select to view content in your preferred language

How to kill a notebook process

15112
16
11-19-2021 12:47 PM
ChrisCowin
Occasional Contributor

I've tried everything I can think of to kill a running notebook that is stuck in a loop and nothing works. The Interrupt Kernel button is always grayed out, tried restarting the kernel through the command prompt (P Key) but this doesnt seem to do anything either. The only way I've figured out how to stop the process is to kill the entire application in task manager.

16 Replies
edward33
Regular Contributor

In the notebook tab in the top banner you can click "interrupt kernel". I've done this a few times with success, unless ArcPro isn't responding at all, then I find this button can be greyed out.

edward33_0-1716570980572.png

 

EugeneSosnin_GSI
Emerging Contributor

You could run a command in CMD:

Taskkill /IM ArcGISPro.exe /F

It will instantly close ArcGIS PRO, with running Python too. You could save Notebook and Project when script is running, and then run the command.

0 Kudos
HenriBrillon
Emerging Contributor

I am still experiencing this instability. Can we expect Esri to introduce reliable interrupt kernel functionality soon?

chris_del101
Regular Contributor

Me too. I run a notebook and it freezes and there is no way to unfreeze. Open and closing an application is not a legitimate solution to this problem. 

Interrupt kernel button is greyed out. Ending task does not work.

0 Kudos
Kopczyknj_CDMSmith
New Contributor

Running 3.4.0 still a problem for me.  For those screenshotting the ribbon, here is what it looks like no matter which window you have active during the process.

0 Kudos
Kopczyknj_CDMSmith
New Contributor

OK, I made a little headway troubleshooting.  For me, I was copy/pasting paths from the catalog tab over to the python window.  I noticed if I did the path copy/paste from a text file that I create before running the script and NOT the catalog window (while the script was running) I was able to maintain the Kernel interruption option.  I'm sure this has something to do with lock file management but maybe it will help others.

0 Kudos
JeffKaplan_Boston
Occasional Contributor

2025, and I am running into this issue as well. I am trying to write a notebook script that iterates through around 500 features with a searchcursor, and had to use task manager to end an accidental infinite loop.

JeffKaplan_Boston_0-1744902404235.png

The Interrupt Kernel button is greyed out for the whole time and the shortcut command doesn't do anything.

I am working in ArcGIS Pro 3.3, it would be great to know if this is an active bug, has been fixed in a later release, or is something Esri is looking into.