Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabled cells are executed when running as a script #1368

Closed
mgunyho opened this issue May 14, 2024 · 1 comment
Closed

Disabled cells are executed when running as a script #1368

mgunyho opened this issue May 14, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@mgunyho
Copy link

mgunyho commented May 14, 2024

Describe the bug

If I have a disabled cell in my notebook, I would expect that it is not run when I execute the notebook as a script with python mynotebook.py. However, in script mode the disabled cells seem to be executing in v0.5.2.

I noticed this when I had some WIP cells that raise exceptions.

Environment

{
  "marimo": "0.5.2",
  "OS": "Linux",
  "OS Version": "5.15.0-105-generic",
  "Processor": "x86_64",
  "Python Version": "3.8.10",
  "Binaries": {
    "Browser": "124.0.6367.207",
    "Node": "--"
  },
  "Requirements": {
    "click": "8.1.7",
    "importlib-resources": "6.3.2",
    "jedi": "0.19.1",
    "markdown": "3.6",
    "pymdown-extensions": "10.7.1",
    "pygments": "2.17.2",
    "tomlkit": "0.12.4",
    "uvicorn": "0.29.0",
    "starlette": "0.37.2",
    "websocket": "missing",
    "typing-extensions": "4.10.0",
    "black": "24.3.0"
  }
}

Code to reproduce

import marimo

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


@app.cell
def __():
    print("enabled cell")
    return


@app.cell(disabled=True)
def __():
    print("disabled cell")  # should not print
    return


if __name__ == "__main__":
    app.run()
@mgunyho mgunyho added the bug Something isn't working label May 14, 2024
@mscolnick mscolnick added the good first issue Good for newcomers label May 14, 2024
@mscolnick
Copy link
Contributor

Thanks for bringing this us - we can get to this later this week, unless you (or anyone) would like to make the contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants