From 8f07f50933d32078da0b9bd96c7e4ffb30eb0d24 Mon Sep 17 00:00:00 2001 From: Elijah Lopez Date: Tue, 16 Apr 2024 18:32:30 -0400 Subject: [PATCH] Suppress TclError for set_theme --- CHANGELOG.txt | 3 +++ build_files/mc_version_info.txt | 8 ++++---- build_files/setup_script.iss | 2 +- src/meta.py | 2 +- src/music_caster.py | 11 +++++++++-- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a021c50c..5505e9c1 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,8 @@ Music Caster by Elijah Lopez Changelog +5.18.3 +- [Fix] Handle experimental feature error + 5.18.2 - [Fix] Changing cast device diff --git a/build_files/mc_version_info.txt b/build_files/mc_version_info.txt index b82824c1..f15f7b6d 100644 --- a/build_files/mc_version_info.txt +++ b/build_files/mc_version_info.txt @@ -2,8 +2,8 @@ # For more details about fixed file info 'ffi' see: http://msdn.microsoft.com/en-us/library/ms646997.aspx VSVersionInfo( ffi=FixedFileInfo( - prodvers=(5, 18, 2, 0), - filevers=(5, 18, 2, 0), + prodvers=(5, 18, 3, 0), + filevers=(5, 18, 3, 0), # Contains a bitmask that specifies the valid bits 'flags'r mask=0x17, # Contains a bitmask that specifies the Boolean attributes of the file. @@ -27,12 +27,12 @@ VSVersionInfo( '000004b0', [StringStruct('CompanyName', 'Elijah Lopez'), StringStruct('FileDescription', 'Music Caster'), - StringStruct('FileVersion', '5.18.2.0'), + StringStruct('FileVersion', '5.18.3.0'), StringStruct('InternalName', 'Music Caster'), StringStruct('LegalCopyright', 'Copyright (c) 2019 - 2024, Elijah Lopez'), StringStruct('OriginalFilename', 'Music Caster.exe'), StringStruct('ProductName', 'Music Caster'), - StringStruct('ProductVersion', '5.18.2.0')]) + StringStruct('ProductVersion', '5.18.3.0')]) ]), VarFileInfo([VarStruct('Translation', [0, 1200])]) ] diff --git a/build_files/setup_script.iss b/build_files/setup_script.iss index e03d1637..4cc61ef7 100644 --- a/build_files/setup_script.iss +++ b/build_files/setup_script.iss @@ -1,5 +1,5 @@ #define MyAppName "Music Caster" -#define MyAppVersion "5.18.2" +#define MyAppVersion "5.18.3" #define MyAppPublisher "Elijah Lopez" #define MyAppURL "https://elijahlopez.ca/software#music-caster" #define MyAppExeName "Music Caster.exe" diff --git a/src/meta.py b/src/meta.py index 1ec61f27..7effead0 100644 --- a/src/meta.py +++ b/src/meta.py @@ -1,4 +1,4 @@ -VERSION = latest_version = '5.18.2' +VERSION = latest_version = '5.18.3' UPDATE_MESSAGE = """ [NEW] Better Error Capturing [MSG] Language translators wanted diff --git a/src/music_caster.py b/src/music_caster.py index 4d2f16bc..a527d313 100644 --- a/src/music_caster.py +++ b/src/music_caster.py @@ -211,6 +211,7 @@ def activate_instance(port=2001, default_timeout=0.5, to_port=2004): sun_valley_tcl_path = f'{sys._MEIPASS}/{SUN_VALLEY_TCL}' except AttributeError: sun_valley_tcl_path = SUN_VALLEY_TCL + sun_valley_tcl_path = os.path.absolute(sun_valley_tcl_path) # LOGS log_format = logging.Formatter('%(asctime)s %(levelname)s (%(lineno)d): %(message)s') # max 1 MB log file @@ -2612,9 +2613,15 @@ def activate_gui(selected_tab=None, url_option='url_play'): location=window_location, metadata=window_metadata, debugger_enabled=is_debug()) if State.using_tcl_theme: Sg.PySimpleGUI.TOOLTIP_BACKGROUND_COLOR = settings['theme']['background'] - with suppress(TclError): + try: + # as per State.using_tcl_theme, sun_valley_tcl_path exists gui_window.TKroot.tk.call('source', sun_valley_tcl_path) - gui_window.TKroot.tk.call('set_theme', 'dark') + gui_window.TKroot.tk.call('set_theme', 'dark') + except TclError as e: + if IS_FROZEN: + handle_exception(e) + else: + raise e if not settings['mini_mode']: gui_window['queue'].update(set_to_index=len(done_queue), scroll_to_index=len(done_queue)) pl_tracks_values, pl_length = format_pl_lb(pl_tracks)