Describe the bug
Running the relabelling GUI from an IPython/Jupyter notebook and then quitting twice causes Jupyter to hang on the second quit. In other words, the status indicator gets stuck on running (filled circle in upper right corner) and no other cells can be run. It is not possible to interrupt the cell, to run the GUI again (or do anything else) you have to restart the kernel (or the server, but that's overkill).
To Reproduce
Steps to reproduce the behavior:
- Create a new IPython/Jupyter notebook with a single cell containing the following:
import deeplabcut
%gui wx
deeplabcut.refine_labels('<path to config file>') # change this to a path to a valid DLC config file on your system
- Run the cell
- Press the quit button in the relabelling GUI
- Run the cell again
- Press the quit button again
- Jupyter is stuck "running" the cell and cannot be interrupted, nor can other cells be run. The normal output on closing the relabelling GUI is printed and no error message appears in the notebook or the console/server logs.
Expected behavior
You can start and quit the relabelling GUI as many times as you want.
Screenshots

Desktop (please complete the following information about your system):
- OS: Windows 10 x64
- Python Version: Python 3.6.9 :: Anaconda, Inc.
- Anaconda Version: 4.7.12
- Jupyter Version: 1.0.0
- DeepLabCut Version: 2.1.4
- Browser: Firefox 71.0
Additional context
This does not happen when running the relabelling GUI from the normal Python REPL as far as I can tell, only from a notebook.
This does not appear to be related to the cannot create multiple GUI event loops bug, as I don't see that error, but I could be wrong. I also couldn't see any other issues that looked the same.
Describe the bug
Running the relabelling GUI from an IPython/Jupyter notebook and then quitting twice causes Jupyter to hang on the second quit. In other words, the status indicator gets stuck on running (filled circle in upper right corner) and no other cells can be run. It is not possible to interrupt the cell, to run the GUI again (or do anything else) you have to restart the kernel (or the server, but that's overkill).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
You can start and quit the relabelling GUI as many times as you want.
Screenshots

Desktop (please complete the following information about your system):
Additional context
This does not happen when running the relabelling GUI from the normal Python REPL as far as I can tell, only from a notebook.
This does not appear to be related to the cannot create multiple GUI event loops bug, as I don't see that error, but I could be wrong. I also couldn't see any other issues that looked the same.