diff --git a/aleapp.py b/aleapp.py index 0f9fa9d6..183bd6e6 100755 --- a/aleapp.py +++ b/aleapp.py @@ -227,8 +227,8 @@ def main(): with open(case_data_filename, "rt", encoding="utf-8") as case_data_file: try: case_data = json.load(case_data_file) - except json.JSONDecodeError as json_ex: - case_data_load_error = f"File was not a valid case data file: {json_ex}" + except: + case_data_load_error = "File was not a valid case data file: invalid format" print(case_data_load_error) return @@ -252,8 +252,8 @@ def main(): with open(profile_filename, "rt", encoding="utf-8") as profile_file: try: profile = json.load(profile_file) - except json.JSONDecodeError as json_ex: - profile_load_error = f"File was not a valid profile file: {json_ex}" + except: + profile_load_error = "File was not a valid case data file: invalid format" print(profile_load_error) return diff --git a/aleappGUI.py b/aleappGUI.py index d07c023a..274b195b 100755 --- a/aleappGUI.py +++ b/aleappGUI.py @@ -70,8 +70,8 @@ def add_case_data(casedata): with open(destination_path, "rt", encoding="utf-8") as case_data_in: try: case_data = json.load(case_data_in) - except json.JSONDecodeError as json_ex: - case_data_load_error = f"File was not a valid case data file: {json_ex}" + except: + case_data_load_error = "File was not a valid case data file: invalid format" if not case_data_load_error: if isinstance(case_data, dict): @@ -82,7 +82,7 @@ def add_case_data(casedata): for key, value in casedata.items(): case_data_window[key].update(value) else: - case_data_load_error = "File was not a valid case data file: invalid format" + case_data_load_error = "File was not a valid case data file: invalid format" if case_data_load_error: sg.popup(case_data_load_error) @@ -123,7 +123,7 @@ def ValidateInput(values, window): one_element_is_selected = False for x in range(1000, module_end_index): - if window.FindElement(x).Get(): + if window[x].Get(): one_element_is_selected = True break if not one_element_is_selected: @@ -196,7 +196,7 @@ def pickModules(): sg.Text('Timezone Offset (Not Implemented Yet):', font=("Helvetica", 14)), sg.Combo(list(tzvalues), size=(20,15), key='timezone',readonly=True) ], - [sg.Column(mlist, size=(300,310), scrollable=True), sg.Output(size=(85,20))], + [sg.Column(mlist, size=(300,310), scrollable=True), sg.Output(size=(85,29))], [sg.ProgressBar(max_value=GuiWindow.progress_bar_total, orientation='h', size=(86, 7), key='PROGRESSBAR', bar_color=('DarkGreen', 'White'))], [sg.Submit('Process', font=normal_font), sg.Button('Close', font=normal_font)] ] @@ -231,7 +231,7 @@ def pickModules(): if destination_path: ticked = [] for x in range(MODULE_START_INDEX, module_end_index): - if window.FindElement(x).Get(): + if window[x].Get(): key = window[x].metadata ticked.append(key) with open(destination_path, "wt", encoding="utf-8") as profile_out: @@ -249,8 +249,8 @@ def pickModules(): with open(destination_path, "rt", encoding="utf-8") as profile_in: try: profile = json.load(profile_in) - except json.JSONDecodeError as json_ex: - profile_load_error = f"File was not a valid profile file: {json_ex}" + except: + profile_load_error = "File was not a valid profile file: invalid format" if not profile_load_error: if isinstance(profile, dict): @@ -296,7 +296,7 @@ def pickModules(): s_items = 0 for x in range(MODULE_START_INDEX, module_end_index): - if window.FindElement(x).Get(): + if window[x].Get(): key = window[x].metadata if key in loader and key != 'usagestatsVersion': search_list.append(loader[key]) diff --git a/requirements.txt b/requirements.txt index 9d67eead..65c51ad1 100755 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ pillow polyline==2.0.0 protobuf==3.10.0 PyCryptodome -PySimpleGUI==4.16.0 +PySimpleGUI pytz simplekml wheel