You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran marimo edit --sandbox example.py in PowerShell on Windows. (Fresh file)
Sometimes ctrl-c works.
Sometimes it is completely ignored.
Sometimes when I cancel quit with 'n' the kernel dies.
I've looked at the previous issues relating to ctrl-c, but they are closed.
I've installed the latest versions of Marimo and uv.
The following screenshot shows the initial run, where the ctrl-c worked, then the I selected 'n', then the kernel died. Then it shows the second run where ctrl-c never worked:
This is the debug log from cancelling the exit (ctrl-c, then 'n'), which leads to the kernel crashing:
[D 250508 16:18:26 runtime:1325] Finished run.
[D 250508 16:18:26 runtime:2093] Handled control request: ExecuteMultipleRequest(cells=1)
INFO: 127.0.0.1:56410 - "POST /api/kernel/sync/cell_ids HTTP/1.1" 200 OK
[D 250508 16:18:27 file_manager:135] Saving app to C:\Users\dwales\example.py
INFO: 127.0.0.1:56410 - "POST /api/kernel/save HTTP/1.1" 200 OK
[D 250508 16:18:29 handlers:26] Interrupt request received
[D 250508 16:18:29 runtime:2674] kernel queue.get() failed [Errno 4] Interrupted function call
Are you sure you want to quit? (y/n): n
[D 250508 16:18:31 sessions:525] Closing session C:\Users\dwales\example.py because kernel died
The Python kernel for file C:\Users\dwales\example.py died unexpectedly.
[D 250508 16:18:31 ws:735] Websocket terminated with CancelledError
INFO: 127.0.0.1:56410 - "GET /api/usage HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 403, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\middleware\errors.py", line 187, in __call__
raise exc
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\middleware\errors.py", line 165, in __call__
await self.app(scope, receive, _send)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\marimo\_server\api\auth.py", line 219, in __call__
return await super().__call__(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\middleware\sessions.py", line 85, in __call__
await self.app(scope, receive, send_wrapper)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\middleware\base.py", line 176, in __call__
with recv_stream, send_stream, collapse_excgroups():
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\contextlib.py", line 158, in __exit__
self.gen.throw(value)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\_utils.py", line 82, in collapse_excgroups
raise exc
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\middleware\base.py", line 178, in __call__
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\marimo\_server\api\middleware.py", line 168, in dispatch
return await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\middleware\base.py", line 156, in call_next
raise app_exc
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\middleware\base.py", line 141, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\marimo\_server\api\auth.py", line 250, in __call__
await super().__call__(scope, receive, send)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\middleware\authentication.py", line 48, in __call__
await self.app(scope, receive, send)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\marimo\_server\api\auth.py", line 239, in wrapped_app
await app(scope, receive, send)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\middleware\cors.py", line 85, in __call__
await self.app(scope, receive, send)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\marimo\_server\api\middleware.py", line 99, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\marimo\_server\api\middleware.py", line 381, in __call__
await self.app(scope, receive, send)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\marimo\_server\api\middleware.py", line 381, in __call__
await self.app(scope, receive, send)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\marimo\_server\api\middleware.py", line 381, in __call__
await self.app(scope, receive, send)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\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\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\routing.py", line 714, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\routing.py", line 734, in app
await route.handle(scope, receive, send)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\routing.py", line 460, in handle
await self.app(scope, receive, send)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\routing.py", line 714, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\routing.py", line 734, in app
await route.handle(scope, receive, send)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\routing.py", line 288, in handle
await self.app(scope, receive, send)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\routing.py", line 73, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\marimo\_server\router.py", line 108, in wrapper_func
response = await response
^^^^^^^^^^^^^^
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\starlette\authentication.py", line 75, in async_wrapper
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\marimo\_server\api\endpoints\health.py", line 215, in usage
kernel_process = psutil.Process(session.kernel_manager.kernel_task.pid)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\psutil\__init__.py", line 317, in __init__
self._init(pid)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\6zd4X2lMTJWJtgw6m4s0n\Lib\site-packages\psutil\__init__.py", line 363, in _init
raise NoSuchProcess(pid, msg=msg) from None
psutil.NoSuchProcess: process PID not found (pid=39960)
INFO: connection closed
[D 250508 16:18:32 middleware:373] Done with websocket proxy for ws://localhost:3119/lsp/pylsp
INFO: connection closed
I've tried running it in debug mode, but this yields a new error:
--- Logging error ---
Traceback (most recent call last):
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\logging\__init__.py", line 1163, in emit
stream.write(msg + self.terminator)
OSError: [WinError 1] Incorrect function
Call stack:
File "<string>", line 1, in <module>
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\multiprocessing\spawn.py", line 122, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\multiprocessing\spawn.py", line 135, in _main
return self._bootstrap(parent_sentinel)
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\multiprocessing\process.py", line 314, in _bootstrap
self.run()
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 2689, in launch_kernel
asyncio.run(control_loop(kernel))
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\runners.py", line 194, in run
return runner.run(main)
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\base_events.py", line 674, in run_until_complete
self.run_forever()
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\base_events.py", line 641, in run_forever
self._run_once()
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\base_events.py", line 1986, in _run_once
handle._run()
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 2683, in control_loop
await kernel.handle_message(request)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 2092, in handle_message
await self.request_handler.handle(request)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 2513, in handle
return await handler(request)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1987, in handle_instantiate
await self.instantiate(request)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1957, in instantiate
await self.run(request.execution_requests)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1511, in run
await _run_with_uninstantiated_requests(execution_requests)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1451, in _run_with_uninstantiated_requests
await self._run_cells(
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1320, in _run_cells
while cell_ids := await self._run_cells_internal(cell_ids):
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1399, in _run_cells_internal
await runner.run_all()
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runner\cell_runner.py", line 589, in run_all
LOGGER.debug("Running post_execution hooks in context")
Message: 'Running post_execution hooks in context'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\logging\__init__.py", line 1163, in emit
stream.write(msg + self.terminator)
OSError: [WinError 1] Incorrect function
Call stack:
File "<string>", line 1, in <module>
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\multiprocessing\spawn.py", line 122, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\multiprocessing\spawn.py", line 135, in _main
return self._bootstrap(parent_sentinel)
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\multiprocessing\process.py", line 314, in _bootstrap
self.run()
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 2689, in launch_kernel
asyncio.run(control_loop(kernel))
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\runners.py", line 194, in run
return runner.run(main)
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\base_events.py", line 674, in run_until_complete
self.run_forever()
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\base_events.py", line 641, in run_forever
self._run_once()
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\base_events.py", line 1986, in _run_once
handle._run()
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 2683, in control_loop
await kernel.handle_message(request)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 2092, in handle_message
await self.request_handler.handle(request)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 2513, in handle
return await handler(request)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1987, in handle_instantiate
await self.instantiate(request)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1957, in instantiate
await self.run(request.execution_requests)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1511, in run
await _run_with_uninstantiated_requests(execution_requests)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1451, in _run_with_uninstantiated_requests
await self._run_cells(
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1320, in _run_cells
while cell_ids := await self._run_cells_internal(cell_ids):
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1399, in _run_cells_internal
await runner.run_all()
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runner\cell_runner.py", line 591, in run_all
post_hook(cell, self, run_result)
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\contextlib.py", line 81, in inner
return func(*args, **kwds)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runner\hooks_post_execution.py", line 63, in _set_imported_defs
LOGGER.debug("Acquiring graph lock to update cell import workspace")
Message: 'Acquiring graph lock to update cell import workspace'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\logging\__init__.py", line 1163, in emit
stream.write(msg + self.terminator)
OSError: [WinError 1] Incorrect function
Call stack:
File "<string>", line 1, in <module>
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\multiprocessing\spawn.py", line 122, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\multiprocessing\spawn.py", line 135, in _main
return self._bootstrap(parent_sentinel)
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\multiprocessing\process.py", line 314, in _bootstrap
self.run()
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 2689, in launch_kernel
asyncio.run(control_loop(kernel))
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\runners.py", line 194, in run
return runner.run(main)
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\base_events.py", line 674, in run_until_complete
self.run_forever()
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\base_events.py", line 641, in run_forever
self._run_once()
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\base_events.py", line 1986, in _run_once
handle._run()
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\asyncio\events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 2683, in control_loop
await kernel.handle_message(request)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 2092, in handle_message
await self.request_handler.handle(request)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 2513, in handle
return await handler(request)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1987, in handle_instantiate
await self.instantiate(request)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1957, in instantiate
await self.run(request.execution_requests)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1511, in run
await _run_with_uninstantiated_requests(execution_requests)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1451, in _run_with_uninstantiated_requests
await self._run_cells(
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1320, in _run_cells
while cell_ids := await self._run_cells_internal(cell_ids):
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runtime.py", line 1399, in _run_cells_internal
await runner.run_all()
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runner\cell_runner.py", line 591, in run_all
post_hook(cell, self, run_result)
File "C:\Users\dwales\AppData\Roaming\uv\python\cpython-3.12.5-windows-x86_64-none\Lib\contextlib.py", line 81, in inner
return func(*args, **kwds)
File "C:\Users\dwales\AppData\Local\uv\cache\archive-v0\GkP4c5-2dEMTJLhhRUps7\Lib\site-packages\marimo\_runtime\runner\hooks_post_execution.py", line 65, in _set_imported_defs
LOGGER.debug("Acquired graph lock to update import workspace.")
Message: 'Acquired graph lock to update import workspace.'
Arguments: ()
I can't reproduce this 100% every time, but typically after a few tries I can reproduce this by running marimo edit --sandbox example.py, then creating a few simple cells such as the following:
print('hi')
1/0print('test')
While ctrl-c typically works immediately after launching marimo, after a couple of minutes, and adding test cells like the above, ctrl-c often stops working.
Here is a debug log from a time when ctrl-c stopped working:
Thanks @mscolnick, that's understandable. I don't think I can commit to fixing this myself unfortunately. Thanks for an excellent tool! I'll work around this issue with WSL for now.
Describe the bug
I ran
marimo edit --sandbox example.py
in PowerShell on Windows. (Fresh file)Sometimes ctrl-c works.
Sometimes it is completely ignored.
Sometimes when I cancel quit with 'n' the kernel dies.
I've looked at the previous issues relating to ctrl-c, but they are closed.
I've installed the latest versions of Marimo and uv.
The following screenshot shows the initial run, where the ctrl-c worked, then the I selected 'n', then the kernel died. Then it shows the second run where ctrl-c never worked:
This is the debug log from cancelling the exit (ctrl-c, then 'n'), which leads to the kernel crashing:
I've tried running it in debug mode, but this yields a new error:
I can't reproduce this 100% every time, but typically after a few tries I can reproduce this by running
marimo edit --sandbox example.py
, then creating a few simple cells such as the following:While
ctrl-c
typically works immediately after launching marimo, after a couple of minutes, and adding test cells like the above,ctrl-c
often stops working.Here is a debug log from a time when ctrl-c stopped working:
So far as I can tell, these issues only occur on Windows. If it's relevant, here's a screenshot of Task Manager at the time:
The only Python process running on the system is
marimo -d edit --sandbox example.py
.Will you submit a PR?
Environment
Code to reproduce
Workaround
When it gets into this state, it's still possible to terminate Marimo from the web interface by clicking the red 'X' in the top right.
The text was updated successfully, but these errors were encountered: