Commit 331ddd6
committed
Handle missing status field in execute_reply from XEUS-based kernels
XEUS-based Jupyter kernels (such as the Maple 2025 kernel) omit the
'status' field from execute_reply messages when execution produces an
error. This violates the Jupyter messaging protocol, which requires
every execute_reply to include status. The missing field causes a
KeyError that crashes notebook execution.
This is a workaround for a kernel-side protocol violation — the right
fix is in the kernel. But the workaround is low-risk: we catch a
specific KeyError("'status'") around client.execute_cell() and record
it as a cell error output rather than crashing. Kernels that conform
to the protocol are unaffected.
Tested against Maple 2025 (XEUS 2.3.1) with 18 Quarto documents
containing executable Maple code blocks.1 parent 10946d2 commit 331ddd6
1 file changed
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
572 | 586 | | |
573 | 587 | | |
574 | 588 | | |
| |||
0 commit comments