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.43k stars 165 forks source link

marimo edit hangs when using starlette==0.26.1 #1552

Closed yhenon closed 1 month ago

yhenon commented 1 month ago

Describe the bug

When using marimo edit , the application simpy hangs:

(venv) $ marimo edit my_script.py 
<no output>

Attempting to connect through the browser prints the following error:

ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/user/code/m/venv/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/home/user/code/m/venv/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
  File "/home/user/code/m/venv/lib/python3.8/site-packages/starlette/applications.py", line 121, in __call__
    self.middleware_stack = self.build_middleware_stack()
  File "/home/user/code/m/venv/lib/python3.8/site-packages/starlette/applications.py", line 107, in build_middleware_stack
    app = cls(app=app, **options)
  File "/home/user/code/m/venv/lib/python3.8/site-packages/marimo/_server/api/auth.py", line 173, in __init__
    super().__init__(
TypeError: __init__() takes from 3 to 8 positional arguments but 9 were given

This is fixed by bumping the starlette version, although it conforms to the reqs in the pyproject.toml

Environment

{ "marimo": "0.6.13", "OS": "Linux", "OS Version": "5.4.0-177-generic", "Processor": "x86_64", "Python Version": "3.8.10", "Binaries": { "Browser": "117.0.5938.149", "Node": "v20.12.0" }, "Requirements": { "click": "8.1.3", "importlib-resources": "5.12.0", "jedi": "0.18.2", "markdown": "3.5.2", "pymdown-extensions": "10.7", "pygments": "2.15.1", "tomlkit": "0.12.3", "uvicorn": "0.23.2", "starlette": "0.26.1", "websocket": "missing", "typing-extensions": "4.11.0", "black": "23.3.0" } }

Code to reproduce

No response

akshayka commented 1 month ago

We have a bug fix on this for main -- a release will be available on PyPI within the next hour. Thanks for reporting.

mscolnick commented 1 month ago

This has been released in https://github.com/marimo-team/marimo/releases/tag/0.6.14