Skip to content

Issue when trying to execute code in an active marimo notebook on the same machine (AI Model used is remote) #30

Description

@abhenderson

Code and Error

bash /home/user/opencodetest/.opencode/skills/marimo-pair/scripts/execute-code.sh --url http://localhost:2718 -c 'import marimo._code_mode as cm; import asyncio; async def main(): async with cm.get_context() as ctx: await ctx.set_ui_value(testslider, 8); asyncio.run(main())'
line 1
import marimo._code_mode as cm; import asyncio; async def main(): async with cm.get_context() as ctx: await ctx.set_ui_value(testslider, 8); asyncio.run(main())
^^^^^
SyntaxError: invalid syntax
The arrow were pointing at async when displayed in opencode.

Background and system configuration

I am getting an error with the code where it tries to run the bash command presumably running the local python version where as the opencode environment, marimo environment are using uv and the .venv was created using uv. it could detect a lack of jq and it installed it and opencode has installed python 3.13.5. But this seems to be a lack of dependencies. The tooling does not seem to detect the presence of uv pyproject.toml etc in the directory it is running marimo and opencode from.

Whilst this isn't using claude, I am using a setup that Vincent used in the YouTube video about marimo-pair. This is currently on Debian Trixie (Chromebook Dev Environment with uv, python 3.13.5 OS installation and uv installed for the user) opencode is a clean install in new directory with skills installed at the project level, manually copied in, from Github repos (Not sure how to do this as a command, but opencode recognises the skills, including marimo-pair, marimo skills, and uv skills from astral-sh.

I have backed this onto ollama running gemma4:26b which can run tools and does work with Marimo Notebooks and other Python code, but is definitely enhanced with the mcp and marimo skills being injected in.

This set up is runniong on an arm laptop, but there doesn't seem to be an issues with the OS detection and it does partially connect to a running notebook, it was just failing on the command above, which means it cannot procede with the modifications. Ollama and gemma4:26b are running on a separate server with sufficient resources for Gemma 4 model and ollama.

It would be good to have some minimum requirements, although opencode, did manage to install python and jq without prompting, but it would help with a baseline for expected tools. I haven't had an in depth look but is there a way to suggest uv use if installed otherwise fallback to pip and OS installed Python as UV dependency management and ability to pull python builds is a powerful combination.

Do please let me know if you need any further information.

Thank you so much for this incredibly valuable project and all of your hard work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions