Get help from the marimo community

I'm trying to update the options in a multiselect, but it's not working, and I'm not sure if what I'm doing is incorrect, or if marimo just doesnt work the same way as my brain. I've got a dataframe and im making two multiselects based on the values in the dataframe. if the user chooses a value from the first multiselect, i want to filter the options in the second with the values based on the selected option. my callback that I wrote for the first multiselect to update the options in the second is properly filtering the dataframe and finding the new values, but the second multiselect always shows all the possible options.

I've tried all sorts of things to get it to work, including moving stuff to other cells, but that kept causing cyclical dependency errors. In the end I'm wanting to make a few different multiselects and then do other stuff with the filtered dataframe.

I was hoping someone around here would be able to provide some insight. thanks!

here's my non working code 😦
Plain Text
import marimo as mo
import polars as pl
main_df = pl.DataFrame(
    {
        "player":["John", "Tom", "Jerry", "Bob"],
        "team":["Spades", "Spades", "Hearts", "Hearts"],
    }
)

def filter_main_df():
    exprs = []
    if player_select.value:
        exprs.append((pl.col("player").is_in(player_select.value)))
    if team_select.value:
        exprs.append((pl.col("team").is_in(team_select.value)))

    if len(exprs)>0:
        return main_df.filter(
            exprs
        )
    return main_df


def on_player_change(_):
    filtered_df = filter_main_df()
    options = filtered_df["team"].unique().to_list()
    print(f"updating team options to: {options}")
    team_select.options = options


player_select = mo.ui.multiselect.from_series(main_df["player"], on_change=on_player_change)
team_select = mo.ui.multiselect.from_series(main_df["team"])
mo.vstack([player_select, team_select])
3 comments
A
Hi there, i'm a current Jupyter user and am trying out Marimo for the first time.

I have used the converter command to convert my Jupyter notebook to Marimo.
Currently, i'm facing an issue where i cannot load my hydra config in the Marimo notebook.

I have ran marimo edit --headless --host 0.0.0.0 --port 8883 in my root dir (/~/project), which is where marimo_notebook.py resides.

project
|- config
|- hydra
|- config.yaml
|- marimo_notebook.py

However, when i run the following to initialize my hydra config:
Plain Text
with hydra.initialize(config_path='./config/hydra'):
    config_1 = hydra.compose(config_name='config')

I get the error below:
Plain Text
Traceback:
...
    self._missing_config_error(
  File "/opt/conda/lib/python3.10/site-packages/hydra/_internal/config_loader_impl.py", line 102, in _missing_config_error
    raise MissingConfigException(
hydra.errors.MissingConfigException: Primary config directory not found.
Check that the config directory '/tmp/marimo_5081/config/hydra' exists and readable


Why is the root dir: /tmp/marimo_5081/ instead of project?
6 comments
u
A
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 hope Marino's uitable can be displayed in the order of the columns I set, but he always puts the "1" column at the beginning
for example: I want the order of the columns is ["-1", "0", "1", "2"]
3 comments
M
D
want to install marimo on local machine with no internet connection,
4 comments
A
P
I am looking for instructions on how to debug some code that is run from a mo.ui.chat box. I get error messages (example pasted), but no stack trace or similar that could bring me closer.
9 comments
M
Å
I am currently made an application in marimo for indeed job posting job search information and I trying to create a docker instance of the app but not getting the same results as in my notebook.
here is my code that is working. the issue is it is not showing any of the app outputs for the charts that i am seeing in my notebook. also think that my start button is not working as I attend it to. (user press start to submit text information above.
Hi, I'm new here. When inside the tutorial notebooks (didn't try my own notebook yet), Marimo kernel keeps crashing.
"ConnectionResetError: [WinError 10054] an existing connection was forcibly closed by the remote host" a few times and then SystemExit. I'm running on windows 10, with python 3.9.13 in a poetry env. I cannot paste much as this is happening on my work computer. Thank you for your help!
21 comments
A
A
M
Trying to learn marimo however after installing when trying to open the tutorial I get zsh command not found. I am using ubuntu on wsl.

marimo tutorial intro
zsh: command not found: marimo
4 comments
M
A
A
In settings, when I try to use github as a provider, it just says unable to connect. I have installed the latest version with pip and also have node.js installed. Can someone please help? I am running marimo on a remote server with either VSCode and port forwarding.
3 comments
M
t
A
I'm having trouble figuring out how to do relative imports (I'm not too familiar with Python modules).

My folder structure is:
/notebooks
-- /public
---- my-notebook.py
-- /private
-- util.py
/src
-- app.py

In my-notebook.py, which I'm running from the project root via marimo edit notebooks/public/my-notebook.py, I have:
Plain Text
from .notebooks.util import warehouse


But I get: ImportError: attempted relative import with no known parent package

I imagine this is an obvious fix for someone with experience here! Just looking to set up re-use of shared setup functions across notebooks
6 comments
A
b
also I think I Need some help here/might be a bug.



I have string hashes that look like something like this 0x0301edd00c61acef95df15455de7... however marimo dataframe keeps converting it into (binary?) numbers. Is there a way to stop this seemingly automatic conversion from happening?
11 comments
M
0
Hi all! First of all THANK YOU for a wonderful new computing experience! Marimo is what my team and I have dreamed that our notebooks could be!

I'm not sure if this is the right forum to ask, as its more jupyterhub related, but thought I'd give it a shot anyway. To offload heavy computations my team and I have deployed jupyterhub using zero to jupyterhub,

I looked into the jupyter-marimo-proxy to get a similar workflow we've used for our pluto.jl notebooks, but Im running into issues. Deploying and testing locally on minikube works just fine, I can open marimo from the jupyterlab launcher and write and execute notebooks. When deployed on our k3s cluster on our servers though we run into errors like the ones attached.

the jupyter-server-proxy seems to refuse connections from the marimo api. I've been tearing my hair out trying to get this to work, but to no avail. Anyone with some jupyterhub experience got any ideas??

Thanks again for a great project!❤️
4 comments
A
d
C