Skip to content

"Notebook does not appear to be JSON" #1

Description

@tobinjones

I can't get this to work, perhaps I'm doing something wrong.

I create a new jupyterlab installation:

mkdir juviotest
cd juviotest
uv init
uv add jupyterlab juvio

I enable the extension and run jupyterlab

uv run jupyter labextension enable juvio-frontend
uv run jupyter lab

I see two new notebook types, "Juvio Notebook" and "Juvio"

Image

Juvio Notebook
If I create a notebook of type "Juvio Notebook", I see a file called untitled.juvio is created. If I look at it on disk, it is blank. When I try to open it, I get the error:

File Load Error for untitled.juvio
Unreadable Notebook: <snip>/testjuvio/untitled.juvio NotJSONError("Notebook does not appear to be JSON: ''")

Juvio
If I create a notebook of type "Juvio", I see a file called Untitled.ipynb is created. On disk it has the contents

{
 "cells": [],
 "metadata": {},
 "nbformat": 4,
 "nbformat_minor": 5
}

It opens fine in jupyterlab and shows that it's using the "Juvio" kernel.

The cell magic %juvio install antigravity works. I can import antigravity from the notebook (nice!). I notice that on disk, the notebook has been replaced by a script

# /// script
# requires-python = "==3.13.2"
# dependencies = [
#   "antigravity==0.1",
<snip>

However, if I save the notebook from jupyterlab this script is overwritten with a normal JSON notebook. If I don't save, and instead just try to open Untitled.ipynb with jupyterlab I get the error

File Load Error for Untitled.ipynb
Unreadable Notebook: <snip>/testjuvio/Untitled1.ipynb NotJSONError('Notebook does not appear to be JSON: \'# /// script\\n# requires-python = "==3....')

Am I doing something wrong here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions