You probably want file_selected, not files. When the file mode is set to single file, then only file_selected signal is emitted, and when the file mode is set to multiple files, only files_selected is emitted. So if you use await files_selected when file mode is set to single file, then it will be stuck forever.
You probably want file_selected, not files. When the file mode is set to single file, then only
file_selected
signal is emitted, and when the file mode is set to multiple files, onlyfiles_selected
is emitted. So if you useawait files_selected
when file mode is set to single file, then it will be stuck forever.