jupyterlite / jupyterlite/pyodide-kernel
jupyterlab-myst fails to eval
- Dominant language
- Python
- Stars
- 90
- Forks
- 47
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
## Description
I have installed jupyterlab-myst in my own JupyterLite deployment (https://lab.climet.eu/main). The frontend-only functionality works, e.g. I can render extra Markdown as expected. jupyterlab-myst also offers in-Markdown evaluation using the
```
{eval}`1+2`
```
syntax which calls into the running kernel. In JupyterLite, this does not seem to work. Instead of displaying `3`, it shows `1+2`. In the debug console log, I can see that communication with the kernel occurs:
```
Executing cell, expressions undefined [956.61770f21fa231b6605ff.js:2:16493](https://lab.climet.eu/main/extensions/jupyterlab-myst/static/956.61770f21fa231b6605ff.js?v=61770f21fa231b6605ff)
Markdown cell 4744c1f8-c913-4899-81e3-f546eec61f87 was executed [956.61770f21fa231b6605ff.js:2:16690](https://lab.climet.eu/main/extensions/jupyterlab-myst/static/956.61770f21fa231b6605ff.js?v=61770f21fa231b6605ff)
Executing named expressions
Map { 0 → "1+2" }
[956.61770f21fa231b6605ff.js:2:17101](https://lab.climet.eu/main/extensions/jupyterlab-myst/static/956.61770f21fa231b6605ff.js?v=61770f21fa231b6605ff)
Performing kernel request
Object { code: "", user_expressions: {…} }
[956.61770f21fa231b6605ff.js:2:17288](https://lab.climet.eu/main/extensions/jupyterlab-myst/static/956.61770f21fa231b6605ff.js?v=61770f21fa231b6605ff)
Re-rendering VDOM for MySTWidget
Object { stateChanged: {…}, _isDisposed: false, _references: {…}, _frontmatter: {}, _mdast: {…}, _expressions: undefined }
false [956.61770f21fa231b6605ff.js:2:7570](https://lab.climet.eu/main/extensions/jupyterlab-myst/static/956.61770f21fa231b6605ff.js?v=61770f21fa231b6605ff)
Re-rendering VDOM for MySTWidget
Object { stateChanged: {…}, _isDisposed: false, _references: {…}, _frontmatter: undefined, _mdast: {…}, _expressions: undefined }
false [956.61770f21fa231b6605ff.js:2:7570](https://lab.climet.eu/main/extensions/jupyterlab-myst/static/956.61770f21fa231b6605ff.js?v=61770f21fa231b6605ff)
Re-rendering VDOM for MySTWidget
Object { stateChanged: {…}, _isDisposed: false, _references: {…}, _frontmatter: undefined, _mdast: {…}, _expressions: undefined }
false [956.61770f21fa231b6605ff.js:2:7570](https://lab.climet.eu/main/extensions/jupyterlab-myst/static/956.61770f21fa231b6605ff.js?v=61770f21fa231b6605ff)
Re-rendering VDOM for MySTWidget
Object { stateChanged: {…}, _isDisposed: false, _references: {…}, _frontmatter: undefined, _mdast: {…}, _expressions: undefined }
false [956.61770f21fa231b6605ff.js:2:7570](https://lab.climet.eu/main/extensions/jupyterlab-myst/static/956.61770f21fa231b6605ff.js?v=61770f21fa231b6605ff)
Handling kernel response
Object { channel: "shell", header: {…}, parent_header: {…}, metadata: {}, content: Object { payload: [], status: "ok", execution_count: 1 }, buffers: [] }
[956.61770f21fa231b6605ff.js:2:17368](https://lab.climet.eu/main/extensions/jupyterlab-myst/static/956.61770f21fa231b6605ff.js?v=61770f21fa231b6605ff)
Handling evaluated user expressions
Array []
[956.61770f21fa231b6605ff.js:2:17720](https://lab.climet.eu/main/extensions/jupyterlab-myst/static/956.61770f21fa231b6605ff.js?v=61770f21fa231b6605ff)
trust changed true [956.61770f21fa231b6605ff.js:2:11769](https://lab.climet.eu/main/extensions/jupyterlab-myst/static/956.61770f21fa231b6605ff.js?v=61770f21fa231b6605ff)
Re-rendering VDOM for MySTWidget
Object { stateChanged: {…}, _isDisposed: false, _references: {…}, _frontmatter: undefined, _mdast: {…}, _expressions: undefined }
true [956.61770f21fa231b6605ff.js:2:7570](https://lab.climet.eu/main/extensions/jupyterlab-myst/static/956.61770f21fa231b6605ff.js?v=61770f21fa231b6605ff)
```
When executing later code cells, the execution counter is increased, so clearly the kernel receives and executes the eval request, but for some reason does not reply with the result.
## Reproduce
1. Go to https://lab.climet.eu/main
2. Execute a Markdown cell with content "{eval}\`1+2\`"
## Context
- JupyterLite version: v0.7.0
- Operating System and version: macOS 26.2
- Browser and version: Firefox 146.0.1
Contributor guide
Research direction
Reproduce the issue at https://lab.climet.eu/main using a Markdown cell containing `{eval}`1+2` and inspect the kernel request and response shown in the debug console. Compare the evaluated user expressions with the expected result; done means the cell displays `3` in JupyterLite rather than `1+2`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100