Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Open
Labels
Milestone
Description
As of#29855 (according togit bisect) on nightly wheels in MNE-Python wenow see:
_____________________ test_plot_raw_selection[matplotlib] ______________________mne/viz/tests/test_raw.py:418: in test_plot_raw_selection fig._fake_keypress(sel_fig.mne.close_key, fig=sel_fig)mne/viz/_mpl_figure.py:2249: in _fake_keypress _fake_keypress(fig, key)mne/viz/utils.py:813: in _fake_keypress fig.canvas.callbacks.process(/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/site-packages/matplotlib/cbook.py:365: in process func(*args, **kwargs)/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/site-packages/matplotlib/widgets.py:2338: in on_key_press self.clear()/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/site-packages/matplotlib/widgets.py:2383: in clear self.update()/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/site-packages/matplotlib/widgets.py:2240: in update self.canvas.restore_region(self.background) ^^^^^^^^^^^^^^^^^^^^^^^^^^E AttributeError: 'FigureCanvasBase' object has no attribute 'restore_region'Locally I can see:
../matplotlib/lib/matplotlib/widgets.py:2221: in update self.canvas.restore_region(self.background)E AttributeError: 'FigureCanvasBase' object has no attribute 'restore_region'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB post_mortem (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> /home/larsoner/python/matplotlib/lib/matplotlib/widgets.py(2221)update()-> self.canvas.restore_region(self.background)(Pdb) p type(self)<class 'matplotlib.widgets.LassoSelector'>(Pdb) p self.canvas<matplotlib.backend_bases.FigureCanvasBase object at 0x7f47ede5ca50>(Pdb) u(Pdb) u(Pdb) u(Pdb) u> /home/larsoner/python/mne-python/mne/viz/utils.py(813)_fake_keypress()-> fig.canvas.callbacks.process((Pdb) p fig<MNESelectionFigure size 300x700 with 3 Axes>MNESelectionFigure subclassesMNEFigure which subclassesmatplotlib.figure.Figure.
I'm hoping this is enough to see the problem and know the solution. But if not, let me know and I'll take the time to whittle this down to a MWE! There might also be some way we are misusing/simulating keypresses in tests or something, but we haven't changed that code in years AFAIK so if this breaks things for us I wouldn't be surprised if it breaks things for others, too.