marimo-team / marimo

A reactive notebook for Python — run reproducible experiments, execute as a script, deploy as an app, and version with git.
https://marimo.io
Apache License 2.0
5.31k stars 155 forks source link

Converting to juypter doesn't display in output of notebook #1669

Closed sherodtaylor closed 1 week ago

sherodtaylor commented 1 week ago

Describe the bug

After exporting to jupyter notebook running markdown or any other output doesn't display in notebook.

Screenshot 2024-06-24 at 10 49 46 AM

Also if you try to do mo.output.append it throws a no context error. I'd like to be able to convert to a jupyter notebook book for a regularly scheduled report my company uses.

Environment

{
  "marimo": "0.6.19",
  "OS": "Darwin",
  "OS Version": "23.5.0",
  "Processor": "arm",
  "Python Version": "3.11.6",
  "Binaries": {
    "Browser": "126.0.6478.63",
    "Node": "v20.10.0"
  },
  "Requirements": {
    "click": "8.1.7",
    "importlib-resources": "missing",
    "jedi": "0.19.1",
    "markdown": "3.6",
    "pymdown-extensions": "10.8.1",
    "pygments": "2.17.2",
    "tomlkit": "0.12.5",
    "uvicorn": "0.30.1",
    "starlette": "0.37.2",
    "websockets": "12.0",
    "typing-extensions": "4.9.0",
    "black": "24.4.2"
  }
}

Code to reproduce

import marimo

__generated_with = "0.6.19"
app = marimo.App()

@app.cell
def __():
    import marimo as mo

    mo.md("""
    output should display in ipython
    """)
    return mo,

@app.cell
def __(mo):
    mo.output.append(mo.md("hello"))
    return

if __name__ == "__main__":
    app.run()