From 42f4985812e1c557fe7d6eb3dafb2848d3a7a638 Mon Sep 17 00:00:00 2001 From: Ramforth Date: Sun, 2 Nov 2025 21:19:28 +0100 Subject: [PATCH] Fix: Correct SyntaxError in gui.py --- gui.py | 25 ------------------------- video-converter.spec | 2 +- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/gui.py b/gui.py index 4f5c114..d9bbde6 100644 --- a/gui.py +++ b/gui.py @@ -168,31 +168,6 @@ class VideoConverterGUI: pass time.sleep(0.1) - self.status_var.set("Converting video...") - success = converter.convert_video(input_path, output_dir, quality) - - if success: - self.status_var.set("Conversion successful!") - messagebox.showinfo("Success", "Conversion completed successfully!") - else: - raise Exception("Conversion failed. Check logs for details.") - - except Exception as e: - self.status_var.set(f"Error: {e}") - try: - with open(config.FFMPEG_LOG_FILE_PATH, "r") as f: - log_lines = f.readlines() - last_10_lines = "".join(log_lines[-10:]) - messagebox.showerror("Error", f"An error occurred: {e}\n\nLast 10 lines of log:\n{last_10_lines}") - except FileNotFoundError: - messagebox.showerror("Error", f"An error occurred: {e}\n\nCould not find log file.") - except Exception as log_e: - messagebox.showerror("Error", f"An error occurred: {e}\n\nCould not read log file: {log_e}") - - finally: - self.convert_button.config(state=tk.NORMAL) - self.cancel_button.config(state=tk.DISABLED) - def cancel_conversion(self): # This is a bit tricky, as we can't easily kill the thread. # For now, we'll just show a message. diff --git a/video-converter.spec b/video-converter.spec index a37678e..6a4b603 100644 --- a/video-converter.spec +++ b/video-converter.spec @@ -6,7 +6,7 @@ a = Analysis(['main.py'], pathex=['/home/joe/Cloud9/Documents/Obisdian/projects/Video Converter'], binaries=[], datas=[], - hiddenimports=[], + hiddenimports=['gui'], hookspath=[], hooksconfig={}, runtime_hooks=[],