E nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
E ------------------
E """Test the GUI widgets abstraction in notebook."""
E from mne.viz import set_3d_backend
E from mne.viz.backends.renderer import _get_backend
E from mne.viz.backends.tests.test_abstract import _do_widget_tests
E from IPython import get_ipython
E
E set_3d_backend('notebook')
E backend = _get_backend()
E
E ipython = get_ipython()
E ipython.magic('%matplotlib widget')
E
E _do_widget_tests(backend)
E ------------------
E
E ---------------------------------------------------------------------------
E TraitError Traceback (most recent call last)
E Input In [1], in <cell line: 13>()
E 10 ipython = get_ipython()
E 11 ipython.magic('%matplotlib widget')
E ---> 13 _do_widget_tests(backend)
E
E File ~/work/1/s/mne/viz/backends/tests/test_abstract.py:23, in _do_widget_tests(backend)
E 21 renderer.sphere([0, 0, 0], 'red', 1)
E 22 central_layout._add_widget(renderer.plotter)
E ---> 23 canvas = backend._Canvas(5, 5, 96)
E 24 canvas.ax.plot(range(10), range(10), label='plot')
E 25 central_layout._add_widget(canvas)
E
Bug summary
In MNE-Python we have an abstraction layer for widgets+toolbars. Until today's latest
pip --preinstall it was working fine. Now it fails with:See https://dev.azure.com/mne-tools/mne-python/_build/results?buildId=21230&view=logs&jobId=2b5832ae-6860-5681-a4e1-fd132048f8b4&j=2b5832ae-6860-5681-a4e1-fd132048f8b4&t=5b9d2bdb-d99e-53c3-c7bb-7166fe849ae1
Code for reproduction
I'll work on boiling it down to a MWE tomorrow hopefully. Could also be a bug with traitlets. But the code that runs on the CIs is essentially this in a notebook I think:
Actual outcome
Full traceback
Expected outcome
No error
Additional information
EDIT: ipympl 0.9.2
Operating system
Ubuntu (GH actions), or macOS M1 (locally)
Matplotlib Version
3.6.0rc1
Matplotlib Backend
Notebook
Python version
3.10
Jupyter version
EDIT: 6.4.11
Installation
pip