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

I'm not able to run Marimo in my machine #3202

Closed
GiovanniGiacometti opened this issue Dec 17, 2024 · 5 comments · Fixed by #3204
Closed

I'm not able to run Marimo in my machine #3202

GiovanniGiacometti opened this issue Dec 17, 2024 · 5 comments · Fixed by #3204
Assignees
Labels
bug Something isn't working platform:windows

Comments

@GiovanniGiacometti
Copy link

GiovanniGiacometti commented Dec 17, 2024

Describe the bug

I created a new project with uv and run the command:

uv add marimo && uv run marimo tutorial intro

It opens the browser but the notebook is empty and the console logs:

ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\uvicorn\protocols\websockets\websockets_impl.py", line 243, in run_asgi    
    result = await self.app(self.scope, self.asgi_receive, self.asgi_send)  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\middleware\errors.py", line 152, in __call__
    await self.app(scope, receive, send)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\marimo\_server\api\auth.py", line 217, in __call__
    return await super().__call__(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\middleware\sessions.py", line 85, in __call__
    await self.app(scope, receive, send_wrapper)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\middleware\base.py", line 101, in __call__
    await self.app(scope, receive, send)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\middleware\authentication.py", line 48, in __call__
    await self.app(scope, receive, send)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\middleware\cors.py", line 77, in __call__
    await self.app(scope, receive, send)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\marimo\_server\api\middleware.py", line 88, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\marimo\_server\api\middleware.py", line 316, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\marimo\_server\api\middleware.py", line 316, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\routing.py", line 715, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\routing.py", line 735, in app
    await route.handle(scope, receive, send)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\routing.py", line 460, in handle
    await self.app(scope, receive, send)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\routing.py", line 715, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\routing.py", line 735, in app
    await route.handle(scope, receive, send)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\routing.py", line 362, in handle
    await self.app(scope, receive, send)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\routing.py", line 95, in app
    await wrap_app_handling_exceptions(app, session)(scope, receive, send)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\starlette\routing.py", line 93, in app
    await func(session)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\marimo\_server\api\endpoints\ws.py", line 88, in websocket_endpoint        
    await WebsocketHandler(
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\marimo\_server\api\endpoints\ws.py", line 459, in start
    get_session()
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\marimo\_server\api\endpoints\ws.py", line 441, in get_session
    new_session = mgr.create_session(
                  ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\marimo\_server\sessions.py", line 730, in create_session
    self.recents.touch(app_file_manager.path)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\marimo\_server\recents.py", line 42, in touch
    state = self.config.read_toml(
            ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\marimo\_utils\config\config.py", line 37, in read_toml
    data = tomlkit.parse(file.read())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\tomlkit\api.py", line 86, in parse
    return Parser(string).parse()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\tomlkit\parser.py", line 139, in parse
    item = self._parse_item()
           ^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\tomlkit\parser.py", line 238, in _parse_item
    return self._parse_key_value(True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\tomlkit\parser.py", line 311, in _parse_key_value
    key = self._parse_key()
          ^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\tomlkit\parser.py", line 360, in _parse_key
    return self._parse_bare_key()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\tomlkit\parser.py", line 404, in _parse_bare_key
    raise self.parse_error(EmptyKeyError)
tomlkit.exceptions.EmptyKeyError: Empty key at line 1 col 0

I might be doing some mistakes but I can't figure it out unfortunately

Environment

{
  "marimo": "0.10.4",
  "OS": "Windows",
  "OS Version": "11",
  "Processor": "Intel64 Family 6 Model 140 Stepping 1, GenuineIntel",
  "Python Version": "3.12.0",
  "Binaries": {
    "Browser": "--",
    "Node": "v18.14.0"
  },
  "Dependencies": {
    "click": "8.1.7",
    "docutils": "0.21.2",
    "itsdangerous": "2.2.0",
    "jedi": "0.19.2",
    "markdown": "3.7",
    "narwhals": "1.18.4",
    "packaging": "24.2",
    "psutil": "6.1.0",
    "pygments": "2.18.0",
    "pymdown-extensions": "10.12",
    "pyyaml": "6.0.2",
    "ruff": "0.8.3",
    "starlette": "0.42.0",
    "tomlkit": "0.12.0",
    "typing-extensions": "4.12.2",
    "uvicorn": "0.34.0",
    "websockets": "14.1"
  },
  "Optional Dependencies": {}
}

Code to reproduce

I'm not sure what else I could give you, let me know if you need more.

Thanks for the support!

@GiovanniGiacometti GiovanniGiacometti added the bug Something isn't working label Dec 17, 2024
@akshayka
Copy link
Contributor

akshayka commented Dec 17, 2024

Thank you for reporting. We should catch this error and resurface it in the terminal, instead of crashing.

@akshayka akshayka self-assigned this Dec 17, 2024
@akshayka
Copy link
Contributor

Can you paste the output of uv run marimo config show?

@GiovanniGiacometti
Copy link
Author

GiovanniGiacometti commented Dec 17, 2024

The output is:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Scripts\marimo.exe\__main__.py", line 8, in <module>
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\marimo\_cli\config\commands.py", line 49, in show
    echo(f"\n🏠 User config from {green(user_config_path)}\n")
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\marimo\_cli\print.py", line 85, in echo
    click.echo(*args, **kwargs)
  File "C:\Users\giova\Desktop\Sides\marimo-tester\.venv\Lib\site-packages\click\utils.py", line 318, in echo
    file.write(out)  # type: ignore
    ^^^^^^^^^^^^^^^
  File "C:\Users\giova\AppData\Local\Programs\Python\Python312\Lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f3e0' in position 2: character maps to <undefined>

@akshayka
Copy link
Contributor

Thank you. This appears to be a windows-specific issue; I cannot reproduce it on my machines.

We will try to fix this soon. In the meantime, you can interact with the tutorial online: https://marimo.app/?slug=c7h6pz

Sorry for the inconvenience!

akshayka added a commit that referenced this issue Dec 18, 2024
Fixes #3202 

An uncaught exception was bringing down the server.
@akshayka
Copy link
Contributor

@GiovanniGiacometti — version 0.10.5 should fix this (it should be on PyPI momentarily). Let me know if you're still hitting this issue? And please re-open the issue if so.

Thanks so much for reporting it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform:windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants