Notebook freezes after opening

Open
#10,632 6 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@mscolnick is already working on this.

Since Aug 24, 2026.

Assessment

This issue has not been assessed yet.

Description

bug cannot reproduce
Describe the bug

I have a notebook to analyse some data and create some graphs. For some reason, the notebook froze and it keeps freezing after one second when I restart marimo. I can open and edit other notebooks but not this one. I tried deleting the session cache and also restarting the computer and updating to the latest marimo version, but to no avail.

Below is the log I get. I pasted the environment below, but the dependencies are incomplete because this is from a test-file. I can not get the environment from the original file because marimo keeps freezing first. At least plotly and boto3 are missing.
$ marimo --log-level debug edit file.py no-token
[D 260824 08:36:37 init:36] Routing to file file.py
[D 260824 08:36:37 lifespans:44] Setup: lsp
[D 260824 08:36:37 manager:524] Using config at /home/name/.config/marimo/marimo.toml
[D 260824 08:36:37 lifespans:60] Language Servers are enabled
[D 260824 08:36:37 lifespans:44] Setup: mcp
[D 260824 08:36:37 manager:524] Using config at /home/name/.config/marimo/marimo.toml
[D 260824 08:36:37 lifespans:44] Setup: etc
[D 260824 08:36:37 lifespans:44] Setup: signal_handler
[D 260824 08:36:37 lifespans:44] Setup: logging

    Edit file.py in your browser 📝

    ➜  URL: http://localhost:2718?access_token=baf8gO1kfx9416bb_PYNcw

    💡 Tip: Run a notebook as a web app
            $ marimo run notebook.py

[D 260824 08:36:37 manager:524] Using config at /home/name/.config/marimo/marimo.toml
[D 260824 08:36:37 lifespans:44] Setup: open_browser
[D 260824 08:36:37 manager:524] Using config at /home/name/.config/marimo/marimo.toml
[D 260824 08:36:37 lifespans:44] Setup: tool_manager
[I 260824 08:36:37 tool_manager:336] ToolManager initialized
[D 260824 08:36:37 lifespans:44] Setup: server_registry
[D 260824 08:36:37 lifespans:237] Skipping server registry: auth=True
[D 260824 08:36:37 lifespans:44] Setup: reap_subprocesses
[I 260824 08:36:37 session_manager:402] Starting LSP server...
[D 260824 08:36:37 manager:524] Using config at /home/name/.config/marimo/marimo.toml
[D 260824 08:36:37 lsp:650] basedpyright is not installed. Skipping LSP server.
[D 260824 08:36:37 lsp:695] ty is not installed. Skipping LSP server.
[I 260824 08:36:37 session_manager:413] LSP server started successfully
[D 260824 08:36:38 auth:54] Validated access_token from query param
[D 260824 08:36:38 assets:359] File key provided: /home/name/repos/Analyse/file.py
[D 260824 08:36:38 manager:524] Using config at /home/name/.config/marimo/marimo.toml
[D 260824 08:36:38 manager:524] Using config at /home/name/.config/marimo/marimo.toml
[D 260824 08:36:41 manager:524] Using config at /home/name/.config/marimo/marimo.toml
[D 260824 08:36:41 ws_endpoint:242] Websocket open request for session with id s_xfxltg
[D 260824 08:36:41 ws_endpoint:246] Existing sessions: {}
[D 260824 08:36:41 session_manager:182] Creating new session for id s_xfxltg
[D 260824 08:36:41 manager:524] Using config at /home/name/.config/marimo/marimo.toml
[D 260824 08:36:41 extensions:420] Attaching extensions
[D 260824 08:36:41 extensions:201] Syncing session view from cache
[D 260824 08:36:41 session_handler:279] Replaying 14 notifications
[D 260824 08:36:41 session_handler:281] Replaying notification CellNotification(cell_id='Hbol', output=CellOutput(channel=CellChannel.OUTPUT, mimetype=text/plain, timestamp=1787553401.8196704), console=[CellOutput(channel=CellChannel.STDERR, mimetype=text/plain, timestamp=1787553401.8196747)], status='idle', stale_inputs=None, run_id=None, serialization=UNSET, timestamp=0)
[D 260824 08:36:41 session_handler:281] Replaying notification CellNotification(cell_id='MJUe', output=CellOutput(channel=CellChannel.OUTPUT, mimetype=text/plain, timestamp=1787553401.819685), console=[CellOutput(channel=CellChannel.STDERR, mimetype=text/plain, timestamp=1787553401.8196864)], status='idle', stale_inputs=None, run_id=None, serialization=UNSET, timestamp=0)
[D 260824 08:36:41 session_handler:281] Replaying notification CellNotification(cell_id='vblA', output=CellOutput(channel=CellChannel.OUTPUT, mimetype=text/plain, timestamp=1787553401.81969), console=[CellOutput(channel=CellChannel.STDERR, mimetype=text/plain, timestamp=1787553401.8197067)], status='idle', stale_inputs=None, run_id=None, serialization=UNSET, timestamp=0)
[D 260824 08:36:41 session_handler:281] Replaying notification CellNotification(cell_id='bkHC', output=CellOutput(channel=CellChannel.OUTPUT, mimetype=text/html, timestamp=1787553401.8197107), console=[CellOutput(channel=CellChannel.STDERR, mimetype=text/plain, timestamp=1787553401.8197117)], status='idle', stale_inputs=None, run_id=None, serialization=UNSET, timestamp=0)
[D 260824 08:36:41 session_handler:281] Replaying notification CellNotification(cell_id='lEQa', output=CellOutput(channel=CellChannel.OUTPUT, mimetype=text/html, timestamp=1787553401.8197138), console=[CellOutput(channel=CellChannel.STDERR, mimetype=text/plain, timestamp=1787553401.8197145)], status='idle', stale_inputs=None, run_id=None, serialization=UNSET, timestamp=0)
[D 260824 08:36:41 session_handler:281] Replaying notification CellNotification(cell_id='PKri', output=CellOutput(channel=CellChannel.OUTPUT, mimetype=text/plain, timestamp=1787553401.8197162), console=[CellOutput(channel=CellChannel.MEDIA, mimetype=text/html, timestamp=1787553401.8197176), CellOutput(channel=CellChannel.STDERR, mimetype=text/plain, timestamp=1787553401.8197184)], status='idle', stale_inputs=None, run_id=None, serialization=UNSET, timestamp=0)
[D 260824 08:36:41 session_handler:281] Replaying notification CellNotification(cell_id='Xref', output=CellOutput(channel=CellChannel.OUTPUT, mimetype=text/html, timestamp=1787553401.8197198), console=[CellOutput(channel=CellChannel.STDERR, mimetype=text/plain, timestamp=1787553401.8197205)], status='idle', stale_inputs=None, run_id=None, serialization=UNSET, timestamp=0)
[D 260824 08:36:41 session_handler:281] Replaying notification CellNotification(cell_id='SFPL', output=CellOutput(channel=CellChannel.OUTPUT, mimetype=text/plain, timestamp=1787553401.8197215), console=[CellOutput(channel=CellChannel.MEDIA, mimetype=text/html, timestamp=1787553401.8197224), CellOutput(channel=CellChannel.STDERR, mimetype=text/plain, timestamp=1787553401.819723)], status='idle', stale_inputs=None, run_id=None, serialization=UNSET, timestamp=0)
[D 260824 08:36:41 session_handler:281] Replaying notification CellNotification(cell_id='BYtC', output=CellOutput(channel=CellChannel.OUTPUT, mimetype=text/plain, timestamp=1787553401.8197243), console=[CellOutput(channel=CellChannel.MEDIA, mimetype=text/html, timestamp=1787553401.8197248), CellOutput(channel=CellChannel.STDERR, mimetype=text/plain, timestamp=1787553401.8197253)], status='idle', stale_inputs=None, run_id=None, serialization=UNSET, timestamp=0)
[D 260824 08:36:41 session_handler:281] Replaying notification CellNotification(cell_id='RGSE', output=CellOutput(channel=CellChannel.OUTPUT, mimetype=text/html, timestamp=1787553401.8197262), console=[CellOutput(channel=CellChannel.MEDIA, mimetype=text/html, timestamp=1787553401.8197272), CellOutput(channel=CellChannel.STDERR, mimetype=text/plain, timestamp=1787553401.8197274)], status='idle', stale_inputs=None, run_id=None, serialization=UNSET, timestamp=0)
[D 260824 08:36:41 session_handler:281] Replaying notification CellNotification(cell_id='Kclp', output=CellOutput(channel=CellChannel.OUTPUT, mimetype=text/plain, timestamp=1787553401.8197284), console=[CellOutput(channel=CellChannel.MEDIA, mimetype=text/html, timestamp=1787553401.8197293), CellOutput(channel=CellChannel.STDERR, mimetype=text/plain, timestamp=1787553401.8197298)], status='idle', stale_inputs=None, run_id=None, serialization=UNSET, timestamp=0)
[D 260824 08:36:41 session_handler:281] Replaying notification CellNotification(cell_id='emfo', output=CellOutput(channel=CellChannel.OUTPUT, mimetype=text/plain, timestamp=1787553401.8197315), console=[CellOutput(channel=CellChannel.STDERR, mimetype=text/plain, timestamp=1787553401.819732)], status='idle', stale_inputs=None, run_id=None, serialization=UNSET, timestamp=0)
[D 260824 08:36:41 session_handler:281] Replaying notification CellNotification(cell_id='Hstk', output=CellOutput(channel=CellChannel.OUTPUT, mimetype=text/plain, timestamp=1787553401.819733), console=[CellOutput(channel=CellChannel.MEDIA, mimetype=text/html, timestamp=1787553401.8197336), CellOutput(channel=CellChannel.STDERR, mimetype=text/plain, timestamp=1787553401.8197339)], status='idle', stale_inputs=None, run_id=None, serialization=UNSET, timestamp=0)
[D 260824 08:36:41 session_handler:281] Replaying notification CellNotification(cell_id='nWHF', output=CellOutput(channel=CellChannel.OUTPUT, mimetype=text/html, timestamp=1787553401.8197348), console=[CellOutput(channel=CellChannel.STDERR, mimetype=text/plain, timestamp=1787553401.8197353)], status='idle', stale_inputs=None, run_id=None, serialization=UNSET, timestamp=0)
[D 260824 08:36:41 ws_endpoint:254] Connected to session /home/philippliebich/repos/Analyse/lu_cvmin_analysis.py with type ConnectionType.NEW
[D 260824 08:36:41 serialize:466] Writing session view to cache /home/name/repos/Analyse/marimo/session/file.py.json
[D 260824 08:36:41 manager:524] Using config at /home/name/.config/marimo/marimo.toml
[W 260824 08:36:41 health:451] Neither nvidia-smi nor rocm-smi succeeded, cannot get GPU stats
[D 260824 08:36:42 manager:524] Using config at /home/name/.config/marimo/marimo.toml
[D 260824 08:36:42 kernel_lifecycle:253] Received control request: CreateNotebookCommand
[D 260824 08:36:42 runtime:2416] Acquiring globals lock to handle request CreateNotebookCommand(execution_requests=(ExecuteCellCommand(cell=Hbol, code_preview=import mar), ExecuteCellCommand(cell=MJUe, code_preview=zlm_zlvm_j), ExecuteCellCommand(cell=vblA, code_preview=# Ziel die), ExecuteCellCommand(cell=bkHC, code_preview=data = get), ExecuteCellCommand(cell=lEQa, code_preview=basis_date), ExecuteCellCommand(cell=PKri, code_preview=px.pie( ), ExecuteCellCommand(cell=Xref, code_preview=zeitlicher), ExecuteCellCommand(cell=SFPL, code_preview=figure = g), ExecuteCellCommand(cell=BYtC, code_preview=mean_vsek_), ExecuteCellCommand(cell=RGSE, code_preview=median_vse), ExecuteCellCommand(cell=Kclp, code_preview=zeitlicher), ExecuteCellCommand(cell=emfo, code_preview=vu_gruppen), ExecuteCellCommand(cell=Hstk, code_preview=vu_plots =), ExecuteCellCommand(cell=nWHF, code_preview=vu_gruppen)), cell_ids=('Hbol', 'MJUe', 'vblA', 'bkHC', 'lEQa', 'PKri', 'Xref', 'SFPL', 'BYtC', 'RGSE', 'Kclp', 'emfo', 'Hstk', 'nWHF'), set_ui_element_value_request=UpdateUIElementCommand(n_elements=0, token=83e234d2-5c29-4fdf-b76d-17b587c5c9f1), auto_run=False, request=HTTPRequest(path='/api/kernel/instantiate', params=0))
[D 260824 08:36:42 runtime:2423] Handling control request: CreateNotebookCommand(execution_requests=(ExecuteCellCommand(cell=Hbol, code_preview=import mar), ExecuteCellCommand(cell=MJUe, code_preview=zlm_zlvm_j), ExecuteCellCommand(cell=vblA, code_preview=# Ziel die), ExecuteCellCommand(cell=bkHC, code_preview=data = get), ExecuteCellCommand(cell=lEQa, code_preview=basis_date), ExecuteCellCommand(cell=PKri, code_preview=px.pie( ), ExecuteCellCommand(cell=Xref, code_preview=zeitlicher), ExecuteCellCommand(cell=SFPL, code_preview=figure = g), ExecuteCellCommand(cell=BYtC, code_preview=mean_vsek_), ExecuteCellCommand(cell=RGSE, code_preview=median_vse), ExecuteCellCommand(cell=Kclp, code_preview=zeitlicher), ExecuteCellCommand(cell=emfo, code_preview=vu_gruppen), ExecuteCellCommand(cell=Hstk, code_preview=vu_plots =), ExecuteCellCommand(cell=nWHF, code_preview=vu_gruppen)), cell_ids=('Hbol', 'MJUe', 'vblA', 'bkHC', 'lEQa', 'PKri', 'Xref', 'SFPL', 'BYtC', 'RGSE', 'Kclp', 'emfo', 'Hstk', 'nWHF'), set_ui_element_value_request=UpdateUIElementCommand(n_elements=0, token=83e234d2-5c29-4fdf-b76d-17b587c5c9f1), auto_run=False, request=HTTPRequest(path='/api/kernel/instantiate', params=0))
[D 260824 08:36:42 runtime:2425] Handled control request: CreateNotebookCommand(execution_requests=(ExecuteCellCommand(cell=Hbol, code_preview=import mar), ExecuteCellCommand(cell=MJUe, code_preview=zlm_zlvm_j), ExecuteCellCommand(cell=vblA, code_preview=# Ziel die), ExecuteCellCommand(cell=bkHC, code_preview=data = get), ExecuteCellCommand(cell=lEQa, code_preview=basis_date), ExecuteCellCommand(cell=PKri, code_preview=px.pie( ), ExecuteCellCommand(cell=Xref, code_preview=zeitlicher), ExecuteCellCommand(cell=SFPL, code_preview=figure = g), ExecuteCellCommand(cell=BYtC, code_preview=mean_vsek_), ExecuteCellCommand(cell=RGSE, code_preview=median_vse), ExecuteCellCommand(cell=Kclp, code_preview=zeitlicher), ExecuteCellCommand(cell=emfo, code_preview=vu_gruppen), ExecuteCellCommand(cell=Hstk, code_preview=vu_plots =), ExecuteCellCommand(cell=nWHF, code_preview=vu_gruppen)), cell_ids=('Hbol', 'MJUe', 'vblA', 'bkHC', 'lEQa', 'PKri', 'Xref', 'SFPL', 'BYtC', 'RGSE', 'Kclp', 'emfo', 'Hstk', 'nWHF'), set_ui_element_value_request=UpdateUIElementCommand(n_elements=0, token=83e234d2-5c29-4fdf-b76d-17b587c5c9f1), auto_run=False, request=HTTPRequest(path='/api/kernel/instantiate', params=0))
[D 260824 08:36:43 serialize:466] Writing session view to cache /home/name/repos/Analyse/marimo/session/file.py.json
[D 260824 08:37:15 session_handler:289] Connection closed for session s_xfxltg with exception (1001, ''), type <class 'starlette.websockets.WebSocketDisconnect'>
[D 260824 08:37:15 ws_endpoint:273] Websocket terminated with CancelledError

Will you submit a PR?
  • Yes
Environment

{
"marimo": "0.24.0",
"editable": false,
"location": "~/repos/Analyse/.venv/lib/python3.13/site-packages/marimo",
"OS": "Linux",
"OS Version": "6.6.87.2-microsoft-standard-WSL2",
"Processor": "x86_64",
"Python Version": "3.13.12",
"Locale": "C",
"Binaries": {
"Browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0",
"Node": "v24.19.0",
"uv": "0.11.4 (x86_64-unknown-linux-gnu)"
},
"Dependencies": {
"click": "8.4.2",
"docutils": "0.23",
"itsdangerous": "2.2.0",
"jedi": "0.19.2",
"markdown": "3.10.3",
"narwhals": "2.25.0",
"packaging": "26.3",
"psutil": "7.2.2",
"pygments": "2.21.0",
"pymdown-extensions": "11.0.1",
"pyyaml": "6.0.3",
"starlette": "1.6.0",
"tomlkit": "0.15.1",
"typing-extensions": "4.16.0",
"uvicorn": "0.52.4",
"websockets": "17.0.1"
},
"Optional Dependencies": {
"loro": "1.13.2",
"pandas": "3.0.5",
"polars": "1.43.2",
"pyarrow": "25.0.1",
"ruff": "0.16.4"
},
"Experimental Flags": {}
}

Code to reproduce

import marimo

__generated_with = "0.23.16"
app = marimo.App(width="full")

@app.cell
def _():
import marimo as mo
import polars as pl
import boto3
import pyarrow.dataset as ds
from datetime import date
import plotly.express as px
import plotly.graph_objects as go
from plotly.subplots import make_subplots
import awswrangler as wr

from src.plot_helper import plot_subplots, plot_subplots_by_partition
from src.aws_helper import get_athena_query_results

return (
    get_athena_query_results,
    go,
    make_subplots,
    pl,
    plot_subplots_by_partition,
    px,
)

@app.cell
def _(get_athena_query_results, query_zeitlicher_verlauf):
data = get_athena_query_results(
query=,
database="database",
s3_uri="s3://bucket/"
)
data.head().collect()
return (data,)

@app.cell
def _(data, go, make_subplots, pl, vu_gruppen):
basis_daten = data.select(
pl.col("sum_lu"),
pl.col("vu").cast(pl.Int8),
pl.col("mean_vsek"),
vsek = pl.col("mean_vsek")*pl.col("sum_lu")
).join(
other=vu_gruppen,
how="inner",
on="vu"
).collect()

basisdiagramm = make_subplots(rows=1, cols=2,specs=[[{"type": "domain"}, {"type": "domain"}]])
basisdiagramm.add_trace(go.Pie(values = basis_daten["sum_lu"],domain=dict(x=[0.0, 0.5])), row=1, col=1)
basisdiagramm.add_trace(go.Pie(values = basis_daten["vsek"],domain=dict(x=[0.5, 1.0])), row=1, col=2)
return

@app.cell
def _(data, pl, px, vu_gruppen):
px.pie(
data.select("sum_lu", "mean_vsek", "vu")
.with_columns(
pl.col("vu").cast(pl.Int8).name.keep(), vsek=pl.col("mean_vsek") * pl.col("sum_lu")
)
.collect()
.join(other=vu_gruppen.collect(), how="inner", on="vu"),
values="vsek",
names="vugruppe",
).show()
return

@app.cell
def _(data, pl):
zeitlicher_verlauf = data.group_by("betriebstag").agg(
pl.col("mean_vsek").mean().name.keep(),
pl.col("median_vsek").mean().name.keep(),
pl.col("quant90_vsek").mean().name.keep(),
pl.col("quant95_vsek").mean().name.keep(),
pl.col("quant99_vsek").mean().name.keep(),
).with_columns(
mean_vsek_rolling_mean=pl.col("mean_vsek").rolling_mean(31),
median_vsek_rolling_mean=pl.col("median_vsek").rolling_mean(31),
quant95_vsek_rolling_mean=pl.col("quant95_vsek").rolling_mean(31),
quant90_vsek_rolling_mean=pl.col("quant90_vsek").rolling_mean(31),
quant99_vsek_rolling_mean=pl.col("quant99_vsek").rolling_mean(31),
).sort(by="betriebstag").collect()
zeitlicher_verlauf.head()
return (zeitlicher_verlauf,)

@app.cell
def _(go, zeitlicher_verlauf):
figure = go.Figure()
figure.add_trace(go.Scatter(x=zeitlicher_verlauf["betriebstag"], y=zeitlicher_verlauf["mean_vsek_rolling_mean"], name="Mean"))
figure.add_trace(go.Scatter(x=zeitlicher_verlauf["betriebstag"], y=zeitlicher_verlauf["median_vsek_rolling_mean"], name="Median"))
figure.add_trace(go.Scatter(x=zeitlicher_verlauf["betriebstag"], y=zeitlicher_verlauf["quant95_vsek_rolling_mean"], name="95. Quantil"))
figure.add_trace(go.Scatter(x=zeitlicher_verlauf["betriebstag"], y=zeitlicher_verlauf["quant90_vsek_rolling_mean"], name="90. Quantil"))
#figure.add_trace(go.Scatter(x=zeitlicher_verlauf["betriebstag"], y=zeitlicher_verlauf["quant99_vsek_rolling_mean"], name="99. Quantil"))

figure.update_layout(
    title=dict(text='vsek pro Lu zeitlicher Verlauf'),
    yaxis_title="vsek"
)
figure.show()
return

@app.cell
def _(px, zeitlicher_verlauf):
mean_vsek_figure = px.scatter(zeitlicher_verlauf, x="betriebstag", y="mean_vsek_rolling_mean", trendline="ols").show()
return

@app.cell
def _(px, zeitlicher_verlauf):
median_vsek_figure = px.scatter(zeitlicher_verlauf, x="betriebstag", y="median_vsek", trendline="ols")
results = px.get_trendline_results(median_vsek_figure)
median_vsek_figure.show()
results.px_fit_results.iloc[0].summary()
return

@app.cell
def _(pl, plot_subplots_by_partition, zeitlicher_verlauf):
zeitlicher_verlauf_jahrevergleich = zeitlicher_verlauf.with_columns(
day_of_year=pl.col("betriebstag").dt.ordinal_day(),
year=pl.col("betriebstag").dt.year()
)
jahresverlauf = plot_subplots_by_partition(
df=zeitlicher_verlauf_jahrevergleich,
x="day_of_year",
y="mean_vsek_rolling_mean",
partition_by="year"
).show()
return

@app.cell
def _(data, pl):
vu_gruppen = pl.scan_csv("vu_vugruppe.csv", separator=",")
vu_cluster = data.with_columns(pl.col("vu").cast(pl.Int8)).join(
other=vu_gruppen.select("vu", "vugruppe"),
on="vu",
how="inner"
)
vu_cluster_monate = vu_cluster.with_columns(
monat_jahr=pl.col("betriebstag").dt.strftime("%-m.%Y"),
).group_by("monat_jahr", "vugruppe").agg(
pl.col("betriebstag").min(),
pl.col("mean_vsek").mean().name.keep(),
pl.col("median_vsek").mean().name.keep(),
pl.col("quant90_vsek").mean().name.keep(),
pl.col("quant95_vsek").mean().name.keep(),
pl.col("quant99_vsek").mean().name.keep(),
)
plot_spalte = "mean_vsek"
return plot_spalte, vu_cluster_monate, vu_gruppen

@app.cell
def _(pl, plot_spalte, plot_subplots_by_partition, vu_cluster_monate):
vu_plots = plot_subplots_by_partition(
df=vu_cluster_monate.with_columns(normiert=pl.col(plot_spalte)/pl.col(plot_spalte).mean().over("vugruppe")),
x="betriebstag",
y="mean_vsek",
partition_by="vugruppe",
mode='markers',
add_trendline=True
).show()
return

@app.cell
def _(pl, vu_gruppen):
vu_gruppen.collect().filter(pl.col("vugruppe") == "Rest")
return

if name == "main":
app.run()

Dominant language
Python
Stars
22.9k
Forks
1.3k
Avg merge
1d 10h
Merged PRs (30d)
380

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from marimo-team/marimo

All issues in marimo-team/marimo

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.