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.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
fix: mo.ui.plotly AttributeError (#1518)
Myles Scolnick346a4ea83f07
diff --git a/marimo/_plugins/ui/_impl/plotly.py b/marimo/_plugins/ui/_impl/plotly.pyindex 0ea5eeffed..ce15c339ee 100644--- a/marimo/_plugins/ui/_impl/plotly.py+++ b/marimo/_plugins/ui/_impl/plotly.py@@ -116,18 +116,22 @@ class plotly(UIElement[PlotlySelection, List[Dict[str, Any]]]):if config is not None:resolved_config = configelse:- resolved_name: str = renderer_name or cast(- str, pio.renderers.default- )- default_renderer: Any = pio.renderers[resolved_name]- if default_renderer is not None:- try:+ try:+ resolved_name: str = renderer_name or cast(+ str, pio.renderers.default+ )+ default_renderer: Any = (+ pio.renderers[resolved_name]+ if resolved_name and resolved_name in pio.renderers+ else None+ )+ if default_renderer is not None:resolved_config = default_renderer.config or {}- except AttributeError:- LOGGER.warning(- "Could not find default renderer configuration. "- "Using an empty configuration."- )+ except AttributeError:+ LOGGER.warning(+ "Could not find default renderer configuration. "+ "Using an empty configuration."+ )super().__init__(component_name=plotly.name,