Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Description
Bug report
Bug summary
A recent bugfix (#17102) in the Tk backend created a new IntVar that does not make reference to a parent widget.
var=tk.IntVar() |
This causes any users of
tkinter.NoDefaultRoot()
to crash when the navbar is instantiated.Code for reproduction
importtkinterfrommatplotlib.figureimportFigurefrommatplotlib.backends.backend_tkaggimportNavigationToolbar2Tk,FigureCanvasTkAggtkinter.NoDefaultRoot()window=tkinter.Tk()fig=Figure()canvas=FigureCanvasTkAgg(fig,window)navbar=NavigationToolbar2Tk(canvas,window)
Actual outcome
NameError: name '_default_root' is not defined
Expected outcome
no crashes
Matplotlib version
- Operating system: Win10
- Matplotlib version: 3.3.1
- Matplotlib backend (
print(matplotlib.get_backend())
): TkAgg - Python version: 3.8.5
- Jupyter version (if applicable):
- Other libraries: