nellyg
nellyg7mo ago

I deployed a FastAPI + Marimo App to

I deployed a FastAPI + Marimo App to Google Cloud Run, and once deployed I am having a few hiccups (note this is specific to deploying via Docker not GCP): - My dark mode setting reverts to light - Any plots that use a plotly backend stop working. I see this traceback which I am not quite sure how to interpret:
2024-05-13T20:18:24.173078Z
File "/app/.venv/lib/python3.11/site-packages/marimo/_output/formatting.py", line 188, in as_html
2024-05-13T20:18:24.173081Z
mimetype, data = formatter(value)
2024-05-13T20:18:24.173085Z
^^^^^^^^^^^^^^^^
2024-05-13T20:18:24.173088Z
File "/app/.venv/lib/python3.11/site-packages/marimo/_output/formatters/plotly_formatters.py", line 29, in _show_plotly_figure
2024-05-13T20:18:24.173091Z
plugin = PlotlyFormatter.render_plotly_dict(json.loads(json_str))
2024-05-13T20:18:24.173095Z
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-05-13T20:18:24.173097Z
File "/app/.venv/lib/python3.11/site-packages/marimo/_output/formatters/plotly_formatters.py", line 38, in render_plotly_dict
2024-05-13T20:18:24.173101Z
default_renderer: Any = pio.renderers[pio.renderers.default]
2024-05-13T20:18:24.173104Z
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
2024-05-13T20:18:24.173108Z
File "/app/.venv/lib/python3.11/site-packages/plotly/io/_renderers.py", line 62, in __getitem__
2024-05-13T20:18:24.173111Z
renderer = self._renderers[item]
2024-05-13T20:18:24.173114Z
~~~~~~~~~~~~~~~^^^^^^
2024-05-13T20:18:25.190983Z
KeyError: ''
2024-05-13T20:18:24.173078Z
File "/app/.venv/lib/python3.11/site-packages/marimo/_output/formatting.py", line 188, in as_html
2024-05-13T20:18:24.173081Z
mimetype, data = formatter(value)
2024-05-13T20:18:24.173085Z
^^^^^^^^^^^^^^^^
2024-05-13T20:18:24.173088Z
File "/app/.venv/lib/python3.11/site-packages/marimo/_output/formatters/plotly_formatters.py", line 29, in _show_plotly_figure
2024-05-13T20:18:24.173091Z
plugin = PlotlyFormatter.render_plotly_dict(json.loads(json_str))
2024-05-13T20:18:24.173095Z
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-05-13T20:18:24.173097Z
File "/app/.venv/lib/python3.11/site-packages/marimo/_output/formatters/plotly_formatters.py", line 38, in render_plotly_dict
2024-05-13T20:18:24.173101Z
default_renderer: Any = pio.renderers[pio.renderers.default]
2024-05-13T20:18:24.173104Z
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
2024-05-13T20:18:24.173108Z
File "/app/.venv/lib/python3.11/site-packages/plotly/io/_renderers.py", line 62, in __getitem__
2024-05-13T20:18:24.173111Z
renderer = self._renderers[item]
2024-05-13T20:18:24.173114Z
~~~~~~~~~~~~~~~^^^^^^
2024-05-13T20:18:25.190983Z
KeyError: ''
2 Replies
dmad
dmad7mo ago
My dark mode setting reverts to light
That's a config level setting not a browser one. You should have a .marimo.toml under home
nellyg
nellygOP7mo ago
Ah thank you. I missed that. I can't seem to find documentation for that anywhere.