Skip to content

Running rr.init() no longer resets notebook state correctly #10561

@jleibs

Description

@jleibs

I believe this PR broke a normal notebook workflow:

See: https://github.com/rerun-io/rerun/blob/main/examples/python/notebook/cube.ipynb

It used to be normal/expected to call rr.init() multiple times in the notebook to reset the context of the recording.

Now this produces an error:

Image

This even breaks using the explicit RecordingStream api:

rec = rr.RecordingStream("rerun_example_cube")

STEPS = 100
twists = math.pi * np.sin(np.linspace(0, math.tau, STEPS)) / 4
for t in range(STEPS):
    rec.set_time("step", sequence=t)
    cube = build_color_grid(10, 10, 10, twist=twists[t])
    rec.log("cube", rr.Points3D(cube.positions, colors=cube.colors, radii=0.5))

rec.notebook_show()

Metadata

Metadata

Assignees

No one assigned

    Labels

    sdk-pythonPython logging API🪳 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions