From 40964ad37bcf88048db8242ce8fddcf196cc645e Mon Sep 17 00:00:00 2001 From: Shota Yamamoto Date: Tue, 15 Feb 2022 20:43:03 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A2=E3=83=97=E3=83=AA=E7=B5=82=E4=BA=86?= =?UTF-8?q?=E6=99=82=E3=81=AEtraceback=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/main.py b/main.py index 7b5fbe7..bdbb067 100644 --- a/main.py +++ b/main.py @@ -202,19 +202,21 @@ def make_button(text, key=None): while True: event, values = main_window.read() - tab1_filename = values['tab1_file'] - tab2_filename1 = values['tab2_file1'] - tab2_filename2 = values['tab2_file2'] - tab1_column_dict = values['tab1_column_dict'] - tab2_column_dict = values['tab2_column_dict'] - date1 = values['tab1_date'] - date2 = values['tab2_date'] + if values != None: + tab1_filename = values['tab1_file'] + tab2_filename1 = values['tab2_file1'] + tab2_filename2 = values['tab2_file2'] + tab1_column_dict = values['tab1_column_dict'] + tab2_column_dict = values['tab2_column_dict'] + date1 = values['tab1_date'] + date2 = values['tab2_date'] # print(f"envet: {event}") # print(f"values: {values}") if event == sg.WIN_CLOSED: - # print("break") - break + # print("break") + # main_window.close() + break elif event == 'Table': data = cleaning(tab1_filename) show_table(data) @@ -257,5 +259,3 @@ def make_button(text, key=None): merged_data = merge(data1, data2) _fig = make_fig(merged_data, tab2_column_dict, date2) save(_fig) - -main_window.close()