Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

Add warning log when repr_mimebundle fails (#9199)

Shahmir Varqha93aab37edd62
diff --git a/marimo/_output/formatters/altair_formatters.py b/marimo/_output/formatters/altair_formatters.py
index 7e308bfd5e..bac5dbd23f 100644
--- a/marimo/_output/formatters/altair_formatters.py
+++ b/marimo/_output/formatters/altair_formatters.py
@@ -48,8 +48,8 @@ class AltairFormatter(FormatterFactory):
mimebundle: MimeBundle | tuple[MimeBundle, MimeBundle] = {}
try:
mimebundle = chart._repr_mimebundle_() or {} # type: ignore
- except Exception:
- pass
+ except Exception as e:
+ LOGGER.warning("Failed to get mimebundle from chart: %s", e)
# When the mimebundle is a tuple, it follows the format
# (data_dict, metadata_dict).