diff --git a/pdf2zh/gui.py b/pdf2zh/gui.py index cc582148..bb882b77 100644 --- a/pdf2zh/gui.py +++ b/pdf2zh/gui.py @@ -445,6 +445,8 @@ def on_select_filetype(file_type): def readuserandpasswd(file_path): tuple_list = [] content = "" + if file_path is None or len(file_path) == 0: + return tuple_list, content if len(file_path) == 2: try: with open(file_path[1], "r", encoding="utf-8") as file: