pwang7 / rebook

96 stars 11 forks source link

Warning when choosing PDF file #10

Open R-e-d-J opened 3 years ago

R-e-d-J commented 3 years ago

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',
    )