Get help from the marimo community

I am trying to make it so I can export a report I built in Marimo to static HTML so that the report is pre-computed and can be displayed on a separate Marimo application. Part of this report goes into a deep dive analysis of specific variables. Currently the report runs on the app so its easy enough to use the dropdown to choose which variable to dive into.

The report however, is very compute intensive, and it would be nice to run the report beforehand and just show the HTML from it in the app. However, in static HTML, the dropdown doesn't work due to it requiring some python code to run. I am trying to find an adequate workaround for this. I attempted to use tabs, which actually worked magnificently, except for I have too many tabs to fit on the screen. The carousel also almost works, however it is not user friendly to have to scroll down in the carousel to see the full deep dive.

I havent messed too much with WASM stuff. Not sure if you can run the WASM html inside another Marimo app? My hope is that the main Marimo app just shows a list of reports that have been generated and can load the selected HTML report. So I am not sure if that is possible with the WASM export. Something that looks like the dropdown but acts like the tabs would be ideal at this point. I know I could generate a large accordion if needed as well, I just don't love the way it looks as much as something like the tabs. But thought I would check and see if there was a more elegant solution to this?

Thanks!
I found my code would not generate any plots after upgrading and gave this error:

''scatter' object has no attribue '_render_model'

This was the case for even the basic example from the reference docs:

https://hvplot.holoviz.org/reference/tabular/scatter.html
Plain Text
import hvplot.pandas  

from bokeh.sampledata.iris import flowers as df

df.sample(n=5)

df.hvplot.scatter(x='sepal_length', y='sepal_width', by='species', legend='top', height=400, width=400)


Downgrading to 0.10.5 resolves this for me.
Is there a way to format tables so that the width of different columns can be adjusted?
7 comments
M
j
To write maths and science more easily, I use some common latex packages, like amsmath, mhchem, siunitx...

These packages have a mathjax version or equivalent.
In jupyter I can require those in mardown cells or use a custom.js.

I must be blind but I couldn't find docs on how to do that with marimo.
3 comments
M
L
Hi everyone,
Sometimes during exploration of data, seeing null values matters. In the above example, I would like to see them explicitly, the same way it's rendered in the 'plain' output. Is that possible ?
Thanks a lot for the great job on marimo
5 comments
e
s
exporting notebook to wasm
$ uv tool run marimo@0.10.2 export html-wasm apps.py -o wasm --mode run
serve it on python http server, after loading the index file, caught
This cell raised an exception: FileNotFoundError('[Errno 44] No such file or directory: 'data.csv''

does wasm export support reading local file?
7 comments
M
l
m
Does anyone want a couple hour job getting me up to speed by team coding my first notebook? The design requirements are pretty simple. I also want to see how an actual developer uses the Marimo features.
1 comment
l
I'm experimenting with deploying my notebook on GitHub Pages. However, the documentation around this feature seems to focus on local notebooks, not those already deployed in the Marimo WASM Playground. What steps would I need to take to export the notebook from the Marimo WASM Playground to move it to GitHub Pages? I used "Download as HTML (exclude code)," but that appears to be static only.
2 comments
M
the image shows a reactive plot with temperature, humidity, and vpd readings from a sensor. When i click on the vpd bubble, ideally the scale would change from 20-100 to 0-2. I have not found a way to do this, no matter how many times I play around with the on_change callback. Is this possible? I was thinking of using the Y2 for vpd, but the chart looks messy. There is probably a better way to visualize all these sensor points. Advice/thoughts appreciated.
Problem you are facing/What is currently happening:

Currently I am trying to deploy a flask app with a marimo endpoint to a Kubernetes cluster, On localhost the setup and routing works fine.
asgi_app = Starlette(
routes=[
Route("/", endpoint=lambda request: RedirectResponse(url="/api/")),
Mount("/api", app=wsgi_app),
Mount("/", app=marimo_app.build()),
]
)

On the cloud we ran into several permission errors. We are creating a user and gave privileges to /tmp folder, but now encounter the error:
OSError: [Errno 30] Read-only file system: '/home/appuser/.marimo'
However, we do not want to give write privileges to that folder.

What would you expect to happen?
Maybe I do not understand the architecture well enough, but it would be nice to be able to specify a folder where marimo reads and writes the data. Here is some more information/trace

File "/usr/local/lib/python3.12/site-packages/marimo/_server/api/endpoints/ws.py", line 441, in get_session
new_session = mgr.create_session(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/marimo/_server/sessions.py", line 729, in create_session
self.recents.touch(app_file_manager.path)
File "/usr/local/lib/python3.12/site-packages/marimo/_server/recents.py", line 49, in touch
self.config.write_toml(state)
File "/usr/local/lib/python3.12/site-packages/marimo/_utils/config/config.py", line 45, in write_toml
_maybe_create_directory(self.filepath)
File "/usr/local/lib/python3.12/site-packages/marimo/_utils/config/config.py", line 67, in _maybe_create_directory
os.makedirs(marimo_directory)
File "<frozen os>", line 225, in makedirs
OSError: [Errno 30] Read-only file system: '/home/appuser/.marimo'



Is there something I can do to change the directory in which .marimo lies?
2 comments
M
m
making selection on chart results in error if timestamp is used:
unsupported operand type(s) for /: 'str' and 'int'
no error if timestamp column isn't used in encode
16 comments
l
M
What's the best way to handle race conditions? For instance, if I have a component A that B depends on, but C depends on A and a state that is set in B. How can I ensure that B is updated before C is updated, since the state update seems to hide reactivity
5 comments
A
j
Hi! I've been exploring integrations with the ASGI mount. I keep hitting issues when trying more complex scenarios than the intro docs / examples.

It's hard to debug and introspect because a lot is bundled together, so I'm looking for some details:

  • what is bundled via create_asgi_app() and what is required for the app to run? (e.g., do I need user_config_manager?)
  • I found marimo._server.api.router.build_routes() but what is required / optional?
  • handling file paths when mounting is challenging (cwd for launching the server vs. main app dir vs. marimo ASGI subapp dir vs. marimo notebook path)
  • the redirect feature from create_redirect_to_slash() adds misdirection and should be opt-in
  • one potential source of challenge is the marimo app bundles HTTP, Websockets, and static files routes, but they might have different mount requirements for the main app (e.g., middlewares, conflicting paths)

solution

have a "core" ASGI app or set of routes with minimal features (no middleware, no LSP, no redirect) for developers. This would be in addition to the current "full ASGI app" that's more user-friendly

I really tried fixing this myself, and I'm willing to contribute, but would require some guidance on how to approach it
5 comments
T
M
Haven't successfully been bale to convert a Jupyter Notebook yet.
1 comment
A
I'm trying to deploy marimo using a docker image on kubernetes but when I have two pods running at the same time, I recieve an "Error to instanciate" due to "Invalid session id".
Have somoene succeeded to scale Marimo horizentally?
3 comments
A
T
H
I often get asked if Marimo can do a wizard style UI to guide the user through the workflow. I'm thinking the closest it can do is https://docs.marimo.io/api/layouts/carousel.html. But in order to be a true wizard, I would like to prevent the user from moving on until a certain task has been completed (fill in form, press button etc.). Could you add this type of logic to the component?
1 comment
M
I wrote a marimo notebook that walks through setting up a (Anthropic) mcp (model context protocol) client. It requires importing mcp. mcp uses pydantic which uses rust so i guess the playground is out to post? Is it appropriate to post in the Gallery? Or where can we post these notebooks if not in these places? Thank you.
7 comments
M
H
while trying to use data explorer with dataframe of DatetimeIndex, looking to do rolling on the DatetimeIndex column, but not seeing the index column in encodings dropdowns
8 comments
e
l
Beginner here. I would like to submit batch image prompts to an API and get back the resulting images for preview locally in a browser. There are other tasks to do in the same notebook, but this is the first one I would like to try to automate.

Before going down this path, is this a job for Marimo? I am aware of stuff like Pipedreams and N8N but do not like these toys. Would rather just write a Python app (been a long time) than use those no code tools.

Then yesterday I discovered Marimo. Is it worth a try to automate my desktop this way?
3 comments
A
S
The notebook loads a couple of Pandas dataframes, each with 5-10M rows, filters each them down to 3-5M rows, samples 10% of them, and plots various charts. Unsure whether to allocate more resources, make my notebook more resource efficient, or something else. I can provide the stacktrace if helpful.
2 comments
A
  1. The problem you're facing
Whenever I type something, annoying documentation keeps popping up which is very unhelpful.

  1. What is currently happening
Someone thought it made sense to show live documentation based on text you're typing. So for example when I am typing the word index to declare a simple variable for a loop, I see a popup with documentation for input by the time I've typed in and IndexError when I reach ind. Not only is this terrible UX it's actually also slowing down the UI making the whole thing feel laggy and clunky.

  1. What you expect to happen
I expect this to be removed because to me it makes zero sense to have this feature. What's more baffling is that when I actually am calling a function / method / constructor I don't see any documentation which at least would make some sense. There I need to repeatedly hover over the name to view the documentation.

But assuming completely removing it gets some pushback, likely from whoever came up with this in the first place, maybe at least add a setting to disable it.
3 comments
S
S
M
Can I add code to a cell that, when executed, is equivalent to clicking the "Expand output" button on the right side of the cell?
13 comments
A
C
M
Is it expected that it doesn't work in a WASM notebook?
4 comments
M
R
I want to give a hint to the user, that they need to press a submit button, if they have made changes to some parts of the inputs. To do this, I want to nudge them by changing the color of the button to red. I tried with callout, but it seems a bit excessive as it just places a large box around my element. Instead I want to make it more subtle, but still visibly different from the standard button color
1 comment
M
Did anyone run into this error when using mo.Thread? Any clue about it?
2 comments
M
b