From 5f5e5350a762e1f55446d92fc9248fc80a391d90 Mon Sep 17 00:00:00 2001 From: wood chen Date: Sat, 24 May 2025 20:19:27 +0800 Subject: [PATCH] =?UTF-8?q?fix(gui):=20=E7=AE=80=E5=8C=96GIF=E7=94=9F?= =?UTF-8?q?=E6=88=90=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E7=9B=B4=E6=8E=A5=E8=A7=A3=E7=A0=81=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gui.py b/gui.py index b542ffb..739dd25 100644 --- a/gui.py +++ b/gui.py @@ -315,7 +315,6 @@ class VideoToGifConverter: startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW startupinfo.wShowWindow = subprocess.SW_HIDE - # 运行调色板生成命令 process = subprocess.Popen( palette_cmd, @@ -379,12 +378,7 @@ class VideoToGifConverter: _, stderr = process.communicate() if process.returncode != 0: - error_output = "" - try: - error_output = stderr.decode("utf-8", errors="replace") - except Exception: - error_output = str(stderr) # Fallback to raw string representation - raise RuntimeError(f"GIF生成失败: {error_output}") + raise RuntimeError(f"GIF生成失败: {stderr.decode()}") # 删除临时调色板文件 if os.path.exists(palette_path):