marimo

M

marimo

Join the community to ask questions about marimo and get answers from other members.

Join

help-support

archived-help-and-support

Why do mo.ui.batch & mo.ui.array clone their contained elements?

batch/array both clone their elements. Why is that needed? What would happen if an UIElement with children wouldn't do that?

Controlling output of long-running process?

My code creates a long-running thread in the background and I'd like to have all the output of the thread go to a single cell. Currently just the first message goes to the cell. Demo code: ``` python from threading import Thread import time...

Detect if running in marimo

Is there a way for my framework to detect if it is currently running in Marimo? e.g. - this is how it is done in Jupyter: https://stackoverflow.com/questions/15411967/how-can-i-check-if-code-is-executed-in-the-ipython-notebook

Issues creating permalinks to playground notebooks

@RJ Budzyński , since the discussion in general has become sprawling, I'm making this thread to consolidate discussion on playground notebook permalinks.

getting the output object from a cell, in which we append the output

I have a table from which I want to select some values, and use this to download attachments, zip them, then present a download button. The process takes time, so I tried using mo.lazy to show a spinner, but it doesn't update more than once, when it's inside an accordion. Therefore, I tried hacking my own solution using the output module. However, it struck me that it's not possible to get the the output object from a cell. I'm thinking something like ```spinner=mo.status.spinner() mo.output.append(spinner) _download_attachments = new_download_attachments_ui(heatpump_table) download_attachments = await _download_attachments()...

Is it possible to use OpenAI Compatible API instead of Copilot for autocompletion?

Hi, the documentation for AI Completion says that we can only use either Copilot or Codeium for autocompletion. Is this still true? Or is there a way to use an OpenAI Compatible Model instead? There is a github issue related to this but hasn't been resolved: https://github.com/marimo-team/marimo/issues/2193...

Real-time collaboration stability?

Hi everyone! I am very excited about the experimental real-time collaboration features that I am trying to use with my university students learning Python! However I am experiencing stability issues: the feature works as expected but after a short while (a few minutes) the remote marimo notebooks are displaying some Failed to save / Failed to fetch, Failed to run / Failed to fetch, errors and new connections are impossible ("Secure connection failed" ; see screenshots). The local notebook is still working properly....
No description

DB Connection SQL Cell not connected to other SQL Cells not linked in dataflow

As you can see in the picture attached from my notebook data flow the cell where I create my DB connection is not linked to the SQL cell below it. This is to be expected because these two cells don't share variables but at the same is wrong because these cells depend on each other for execution. I don't know what a good solution for this is at the moment. I think I suggested in another post to have a DB connection tab on the left side menu, this wouldn't solve this particular issue but might be beneficial. @Myles Scolnick...
No description

Unable to show CatBoost widgets

Hello, I'm new to Marimo. I'm working with machine learning using CatBoost library for gradient boosting. Some CatBoost features allows to visualize some widgets. CatBoost widgets do work in JupyterLab but not in marimo. I have installed anywidget package this does not work. ...
No description

Confused about python version enforcement in sandbox

``` ➜ ~/projects/nbs git:(lcr-mer-772) ✗ VPN ✓ $ head -n 2 zon.py 16:21:45 /// script requires-python = ">=3.11"...

Accessing Middleware Values in a Marimo Cell

I'm running a FastAPI server with Marimo and using SessionMiddleware to manage authentication via a cookie containing the access token. Here's the FastAPI setup: ``` server = marimo.create_asgi_app() apps_dir = os.path.join(os.path.dirname(file), "apps")...

Rendering SVG in wasm notebook.

I have an image represented as SVG text, and I want it rendered in a cell of a wasm notebook. How?
Solution:
like this?

How to use local AI model like Llama instead of OpenAI

Has anyone tried using a local API endpoint for an AI assistant instead of the OpenAI API? I have Ollama running on my laptop, along with several models to assist with my tasks. That’s why I want to use this local model instead of relying on Anthropic, OpenAI, or Google. By the way, I’m using Llama and Open WebUI....

Vim insert mode, enter not creating new line

Hi, quick question possibly dumb question, on the latest update 0.10.10, does enter creates a new line in insert mode ? It doesn't seem to do it anymore for me. Thanks!

GitHub copilot unable to connect when using VSCode port forwarding

When running a marimo notebook locally on my laptop copilot works as it should, but when I use the Visual Studio Code port forwarding feature and I connect to the same marimo notebook using the forwarded address, copilot stops working and I get a websockets.exceptions.InvalidURI: http://localhost:2918/copilot isn't a valid URI: scheme isn't ws or wss. Any idea why this is happening? And how can this be fixed?...

Alternative to mo.state() for Keeping Track of a List

Hi everyone, Here’s what I want to do: I have a list a = [] I also have b = mo.ui.text(). I want a to keep appending b.value every time I enter new text into b....

Serving multiple marimo apps on the same fastapi app

I am trying to serve marimo apps on a company server (python, not webassembly). I have fastapi working fine, but I am running up against a problem with imports. Originally I thought the sandbox imports would work, but it looks like this is not the case (I found a message on this discord). ...

How come some cells have a fullscreen button and some don't?

How come some cells have a fullscreen button on the top lefthand side, but some don't? Is it generated based off a heuristic or something?

How can we define a project's root directory?

For example, given
src/my_proj/processors/simple_processor.py
notebooks/nb1.py
src/my_proj/processors/simple_processor.py
notebooks/nb1.py
...

justify elements with vstack

Is there a way to let two elements align in a way that jusfies both left and right hand side of the composite component? Currently, I get something like this. But I would like to extend the elements sides so they match:
No description
Next