From 902e19e25e5da8cb3b39df21eb164c7399ac96cf Mon Sep 17 00:00:00 2001 From: Bikatr7 Date: Mon, 17 Jun 2024 07:04:35 +0900 Subject: [PATCH] corrected missing attribute on clear genders callback --- webgui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webgui.py b/webgui.py index 75ffdca..2ebd345 100644 --- a/webgui.py +++ b/webgui.py @@ -1447,7 +1447,7 @@ def set_genders_file(input_gender_file:gr.File): ##----------------start-of-clear_genders_file()--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - def clear_genders_file(temp_file) -> None: + def clear_genders_file(temp_file:gr.File) -> None: """ @@ -1460,7 +1460,7 @@ def clear_genders_file(temp_file) -> None: with open(FileEnsurer.config_translation_genders_path, "w", encoding="utf-8") as f: json.dump(FileEnsurer.DEFAULT_GENDER_SETTINGS, f, indent=4) - with open(temp_file, "w", encoding="utf-8") as f: + with open(temp_file.name, "w", encoding="utf-8") as f: # type: ignore json.dump(FileEnsurer.DEFAULT_GENDER_SETTINGS, f, indent=4) except: