From 1c164ea3d920e87af9466ca8e87e831422542ef7 Mon Sep 17 00:00:00 2001 From: MikiVL Date: Tue, 5 May 2026 13:36:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=BA=20callPython=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20spawn=20=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E9=98=B2=E6=AD=A2=E8=BF=9B=E7=A8=8B=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=97=B6=E6=B0=B8=E4=B9=85=E6=8C=82=E8=B5=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/ipc/templateIpc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/electron/ipc/templateIpc.js b/electron/ipc/templateIpc.js index c533fb2..fb1ac51 100644 --- a/electron/ipc/templateIpc.js +++ b/electron/ipc/templateIpc.js @@ -28,6 +28,7 @@ function callPython(payload) { reject(new Error("Python 返回了无效 JSON: " + stdout)); } }); + proc.on("error", (e) => reject(new Error("Python 进程启动失败: " + e.message))); proc.stdin.write(JSON.stringify(payload) + "\n"); proc.stdin.end(); });