DenoDDeno
Powered by
callmephilipC
Deno•16mo ago•
6 replies
callmephilip

Deno + Jupyter - a couple of hiccups: jupyter execute and tests

First things first, Deno + Jupyter is amazing - kudos to the team.

A couple of things that did not work out for me which I would like some more context to understand and try to fix/report on.

I've originally reported on them here (https://github.com/rgbkrk/denotebooks/issues/8) and here (https://github.com/rgbkrk/denotebooks/issues/9).

jupyter execute fails for certain notebooks


Trying to run jupyter execute (e.g.
jupyter execute --kernel_name=deno hello.ipynb
jupyter execute --kernel_name=deno hello.ipynb
) on some notebooks fails with the following error (more info: https://github.com/rgbkrk/denotebooks/issues/8):

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.10/x64/bin/jupyter-execute", line 8, in <module>
    [.........]
    line 1103, in process_message
    display_id = content.get("transient", {}).get("display_id", None)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.10/x64/bin/jupyter-execute", line 8, in <module>
    [.........]
    line 1103, in process_message
    display_id = content.get("transient", {}).get("display_id", None)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'


tests inside notebooks


Failing tests inside notebooks do not cause actual runtime errors but simply print error output. This effectively means that when you run
jupyter execute
jupyter execute
on a notebook, it exits normally instead of reporting an error

import { assert } from "jsr:@std/assert";

Deno.test("failing test", () => {
  assert(false);
});
import { assert } from "jsr:@std/assert";

Deno.test("failing test", () => {
  assert(false);
});
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Deno + Jupyter
RJ BudzyńskiRRJ Budzyński / help
2y ago
Jupyter Docker with Deno?
cnrdCcnrd / help
14mo ago
Deno Jupyter Lab tsconfig
JosuJJosu / help
2y ago
Deno with Jupyter AI
RedBeanRRedBean / help
2y ago