From fc903aea76c84cf756812dec36ce8cc89ff0f5ec Mon Sep 17 00:00:00 2001 From: Shahmir Varqha Date: Sat, 21 Dec 2024 13:32:31 +0800 Subject: [PATCH] fix get run_id_context for error'ed cells --- marimo/_messaging/ops.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/marimo/_messaging/ops.py b/marimo/_messaging/ops.py index 1049613b0c3..48b99dae056 100644 --- a/marimo/_messaging/ops.py +++ b/marimo/_messaging/ops.py @@ -134,15 +134,11 @@ class CellOp(Op): def __post_init__(self) -> None: try: - # run_id context is only set during a run - if self.status is not None: - self.run_id = RUN_ID_CTX.get() + self.run_id = RUN_ID_CTX.get() except LookupError: # Be specific about the exception we're catching # The context variable hasn't been set yet - # TODO: where are these warnings coming from? - # good enough to silence for now? - LOGGER.warning("No run_id context found, setting to None") + # may want to explore why this is happening in the future self.run_id = None except Exception as e: LOGGER.error("Error getting run id: %s", str(e))