Closed
Description
There is no guarantee that canvas having a manager attribute, which was exactly what happened in my case.
fname = tkinter.filedialog.asksaveasfilename(
master=self.canvas.manager.window,
title='Save the figure',
filetypes=tk_filetypes,
defaultextension=defaultextension,
initialdir=initialdir,
initialfile=initialfile,
)
I suggest the following change to fix the problem.
fname = tkinter.filedialog.asksaveasfilename(
master=self.canvas._master,
title='Save the figure',
filetypes=tk_filetypes,
defaultextension=defaultextension,
initialdir=initialdir,
initialfile=initialfile,
)