matplotlib / matplotlib/ipympl

JupyterLab - sharing kernels breaks ipympl

Offen
#328 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Jupyter Notebook
Sterne
1.7k
Forks
234
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

## Describe the issue
If I have two notebooks open in jupyterlab, with the kernel of the second chosen as the kernel of the first (using jupyterlab gui kernel dropdown menu -> change kernel and making a choice from "use kernel from preferred session" and selecting notebook1.ipynb). If I try and use ipympl in this second notebook I get the "Error displaying widget: model not found" error. But ipympl works perfectly if I select the second (and original) kernel for the second notebook.

I'm doing this kernel sharing because I am using jupyterlab to control my experiment and only once instance of the hardware control code can be loaded. My idea is that my various measurements will be in separate jupyter notebooks but control a single kernel (where the hardware is defined). So far this idea works fine except for ipympl, I can still plot with `%matplotlib inline`.

I have tested this in a fresh conda environment with the latest versions of everything (AFAIK).

## Versions

```
3.9.5 (default, May 18 2021, 14:42:02) [MSC v.1916 64 bit (AMD64)]

ipympl version: 0.7.0
jupyter core : 4.7.1
jupyter-notebook : 6.4.0
qtconsole : 5.0.3
ipython : 7.22.0
ipykernel : 5.3.4
jupyter client : 6.1.12
jupyter lab : 3.0.16
nbconvert : 6.0.7
ipywidgets : 7.6.3
nbformat : 5.1.3
traitlets : 5.0.5
Known nbextensions:
config dir: C:\Users\monnvadmin\anaconda3\envs\control\etc\jupyter\nbconfig
notebook section
jupyter-matplotlib/extension enabled
- Validating: ok
jupyter-js-widgets/extension enabled
- Validating: ok
JupyterLab v3.0.16
C:\Users\monnvadmin\anaconda3\envs\control\share\jupyter\labextensions
jupyter-matplotlib v0.9.0 enabled ok
@jupyter-widgets/jupyterlab-manager v3.0.0 enabled ok (python, jupyterlab_widgets)

```

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere das Problem in JupyterLab 3.0.16, indem du den Kernel von notebook1.ipynb über das Kernel-Dropdown-Menü freigibst. Verwende dann ipympl im zweiten Notebook und beobachte den Widget-Modellfehler. Vergleiche dies mit dem funktionierenden Fall mit separaten Kernels; abgeschlossen ist die Aufgabe, wenn ipympl korrekt angezeigt wird, wenn Kernel gemeinsam verwendet werden, ohne den gemeldeten Fehler.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
jupyter-notebook
Bereich
backend, frontend
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.