Skip to content

Commit dd9a6bd

Browse files
committed
Log error in executeKernelOneshot() same way as in executeKernelKeepalive()
1 parent 12c5ace commit dd9a6bd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/execute/jupyter/jupyter-kernel.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ export async function executeKernelOneshot(
6464
);
6565

6666
if (!result.success) {
67+
trace(options, "Error executing notebook with oneshot kernel");
68+
if (result.stderr) {
69+
error(result.stderr, { colorize: false });
70+
}
71+
printExecDiagnostics(options.kernelspec, result.stderr);
6772
return Promise.reject();
6873
}
6974
}
@@ -209,6 +214,7 @@ async function execJupyter(
209214
"PYDEVD_DISABLE_FILE_VALIDATION": "1",
210215
},
211216
stdout: "piped",
217+
stderr: "piped",
212218
},
213219
kernelCommand(command, "", options),
214220
);
@@ -443,6 +449,9 @@ async function connectToKernel(
443449
debug,
444450
}, options.kernelspec);
445451
if (!result.success) {
452+
if (result.stderr) {
453+
error(result.stderr, { colorize: false });
454+
}
446455
return Promise.reject();
447456
}
448457

0 commit comments

Comments
 (0)