rebook
rebook copied to clipboard
Warning when choosing PDF file
On MacOS when I clic on the 'Open PDF file' button, I've the following warning:
2021-08-24 11:44:57.825 Python[52152:29984241] WARNING: <NSOpenPanel: 0x7fa4b84cd590> running implicitly; please run panels using NSSavePanel rather than NSApplication.
I've search on google, it come from:
filename = tkinter.filedialog.askopenfilename(
parent=root,
filetypes=formats,
title='Choose a file',
)
It's because you use the parent param. If you erase it, no more warning:
filename = tkinter.filedialog.askopenfilename(
filetypes=formats,
title='Choose a file',
)