marimo
marimo copied to clipboard
[Islands] loading spinner not spinning
Describe the bug
When opening a simple marimo page generated using islands, the loading widget at the top of the page is not spinning.
note: it seems that css variables are not defined, which causes issues:
Will you submit a PR?
- [ ] Yes
Environment
{
"marimo": "0.17.7",
"editable": false,
"location": "/var/mnt/data/Proj/marimo-islands-bugs/.venv/lib64/python3.14/site-packages/marimo",
"OS": "Linux",
"OS Version": "6.17.7-300.fc43.x86_64",
"Processor": "",
"Python Version": "3.14.0",
"Locale": "en_US",
"Binaries": {
"Browser": "--",
"Node": "--"
},
"Dependencies": {
"click": "8.3.0",
"docutils": "0.22.3",
"itsdangerous": "2.2.0",
"jedi": "0.19.2",
"markdown": "3.10",
"narwhals": "2.10.2",
"packaging": "25.0",
"psutil": "7.1.3",
"pygments": "2.19.2",
"pymdown-extensions": "10.16.1",
"pyyaml": "6.0.3",
"starlette": "0.50.0",
"tomlkit": "0.13.3",
"typing-extensions": "missing",
"uvicorn": "0.38.0",
"websockets": "15.0.1"
},
"Optional Dependencies": {},
"Experimental Flags": {}
}
Code to reproduce
To reproduce:
- Create a new marimo notebook named "simple.py"
- add just a cell, like
print(1) - convert it to a html page using a script like:
import asyncio
from marimo import MarimoIslandGenerator
from marimo._server.file_router import AppFileRouter
from marimo._utils.marimo_path import MarimoPath
async def main():
path = MarimoPath("./simple.py")
file_router = AppFileRouter.from_filename(path)
file_key = file_router.get_unique_file_key()
assert file_key is not None
file_manager = file_router.get_file_manager(file_key)
generator = MarimoIslandGenerator()
stubs = []
for cell_data in file_manager.app.cell_manager.cell_data():
stubs.append(
generator.add_code(
cell_data.code,
display_code=True,
)
)
generator._stubs = stubs
generator._config = file_manager.app.config
_app = await generator.build()
head = generator.render_head()
body = generator.render_body()
html = (
f"""<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title> Marimo test website </title>
{head}
</head>
<body>
{body}
</body>
</html>
"""
).strip()
with open("simple.html", "w", encoding="utf-8") as f:
f.write(html)
if __name__ == "__main__":
asyncio.run(main())
- Launch a web server (
python3 -m htp.server) - open
simple.htmlin the browser - observe the spinner not spinning