Unable to view HTML exported notebook when offline
Author: ForceBruCreated Jan 15, 2024Updated Sep 30, 2026
Labelsenhancement
Describe the bug
How to reproduce
- Create an empty notebook:
marimo edit random_notebook.py. Fill it with random code likeprint("Hello"), execute & save. - Export the notebook as HTML.
- Open the HTML file in the browser. I see the notebook, all fine.
- Disconnect from the Internet, clear/disable browser caches, reload the HTML file. The point is to make sure nothing is loaded from caches.
- All I see is a white page and errors like "couldn't load resource because no Internet connection" in the console. I suppose it's because the exported notebook can't load stuff like
<script type="module" crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/assets/index-z8usByTF.js">since I'm offline and disabled caches.
Why I think this is not good
IMO, exported notebooks should be more accessible than the editable notebook that pops up with marimo edit. One should be able to read it almost anywhere, like a PDF document or an image. Especially given that the exported notebook is a static HTML file with mostly text (my code) - I should be able to view it offline.
Environment
{
"marimo": "0.1.77",
"OS": "Darwin",
"OS Version": "22.6.0",
"Processor": "i386",
"Python Version": "3.12.1",
"Binaries": {
"Chrome": "--",
"Node": "--"
},
"Requirements": {
"black": "23.12.1",
"click": "8.1.7",
"jedi": "0.19.1",
"pymdown-extensions": "10.7",
"tomlkit": "0.12.3",
"tornado": "6.4",
"typing_extensions": "4.9.0"
}
}Code to reproduce
Code doesn't matter, any code will do.
Source: marimo-team/marimo