%gui tk hangs the notebook if a traceback occurs

If I issue a %gui tk (no need to actually run any code that uses tk), then after a second or so, executing a cell gets stuck in the [*] state, this is recoverable by interrupting and running the cell again. From that point on, cells can be run normally, but if running a cell causes a python traceback to occur, then the next attempt at executing a cell results in the [] state, and the only way to get out of it is to restart the kernel. Simplest steps to reproduce:

  • %gui tk
  • 0/0 # May get stuck in [*] state, interrupt and run again
  • 1+1 # The notebook will hang at this point, requiring a kernel restart

Should I open an issue?

Python 3.8.8, jupyter 1.0.0, jupyter_server 1.4.1. What other package versions should I provide?