ipython / ipython/ipykernel

Cannot restart and run all cells in notebooks with %gui qt magic

Abierto
#559 1 comentario 3 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
734
Forks
412
Merge medio
1 d 5 h
PR fusionados (30 d)
8

Descripción

# Description

*Note: I originally submitted this issue in another repository (https://github.com/jupyter/jupyter_core/issues/207), who have suggested that here might be the right place instead. Please let me know if this isn't the right home for it.*

When I try to "Restart and Run All" cells with a notebook containing a `%gui qt` magic, the cells don't execute properly but hang intead.

Related (cc @jni): https://github.com/jupyter/nbclient/issues/97

# How to reproduce
You can reproduce it using [this example gist](https://gist.github.com/GenevieveBuckley/6ad4874a789949e9039becf783716bf4), and clicking "Restart & Run All".

Here's the version numbers of the most relevant packages in my environment:
```
ipykernel 5.3.4 pypi_0 pypi
ipython 7.19.0 pypi_0 pypi
ipython-genutils 0.2.0 pypi_0 pypi
jupyter 1.0.0 pypi_0 pypi
jupyter-book 0.8.3 pypi_0 pypi
jupyter-cache 0.4.1 pypi_0 pypi
jupyter-client 6.1.7 pypi_0 pypi
jupyter-console 6.2.0 pypi_0 pypi
jupyter-core 4.6.3 pypi_0 pypi
jupyter-sphinx 0.3.2 pypi_0 pypi
jupyterlab-pygments 0.1.2 pypi_0 pypi
matplotlib 3.3.2 pypi_0 pypi
nbclient 0.5.0 pypi_0 pypi
nbconvert 5.6.1 pypi_0 pypi
nbformat 5.0.7 pypi_0 pypi
numpy 1.19.2 pypi_0 pypi
pyqt5 5.14.2 pypi_0 pypi
pyqt5-sip 12.8.1 pypi_0 pypi
```

## What happened
The last cell hangs, and never produces the matplotlib graph. Here's a screenshot:

jupyter-notebook-restatrt-and-run-all

## What I expected to happen instead
I expected the notebook output to be the same as when I individually run each notebook cell in order.

jupyter-notebook-manual-run-all-cells

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.