I have searched the existing issues and discussions.
I am using the latest version of Open WebUI.
Installation Method
Pip Install
Open WebUI Version
Latest
Ollama Version (if applicable)
No response
Operating System
Windows 11 Home
Browser (if applicable)
No response
Confirmation
I have read and followed all instructions in README.md.
I am using the latest version of both Open WebUI and Ollama.
I have included the browser console logs.
I have included the Docker container logs.
I have listed steps to reproduce the bug in detail.
Expected Behavior
The code should have been executed normally on clicking run.
Actual Behavior
It shows the following error: Error: timed out during opening handshake
Steps to Reproduce
Generate a code using any model.
Click on "Run"
Wait for execution output.
Logs & Screenshots
Jupyter Logs:
[I 2025-03-22 22:37:35.321 ServerApp] User 987140793dfe407fa4741645782beddf logged in.
[I 2025-03-22 22:37:35.322 ServerApp] 302 POST /login (987140793dfe407fa4741645782beddf@127.0.0.1) 51.00ms
[I 2025-03-22 22:37:35.390 ServerApp] Kernel started: 10408737-a189-49b3-8771-f1f83cbbf61a
[W 2025-03-22 22:37:37.421 ServerApp] No session ID specified
[I 2025-03-22 22:37:45.429 ServerApp] Kernel shutdown: 10408737-a189-49b3-8771-f1f83cbbf61a
[W 2025-03-22 22:38:37.447 ServerApp] Timeout waiting for kernel_info reply from 10408737-a189-49b3-8771-f1f83cbbf61a
[E 2025-03-22 22:38:37.448 ServerApp] Uncaught exception GET /api/kernels/10408737-a189-49b3-8771-f1f83cbbf61a/channels (127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/kernels/10408737-a189-49b3-8771-f1f83cbbf61a/channels', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\tornado\web.py", line 1790, in _execute
result = await result
^^^^^^^^^^^^
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\jupyter_server\services\kernels\websocket.py", line 66, in get
await super().get(kernel_id=kernel_id)
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\tornado\websocket.py", line 273, in get
await self.ws_connection.accept_connection(self)
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\tornado\websocket.py", line 863, in accept_connection
await self._accept_connection(handler)
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\tornado\websocket.py", line 903, in _accept_connection
self.selected_subprotocol = handler.select_subprotocol(subprotocols)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\jupyter_server\services\kernels\websocket.py", line 88, in select_subprotocol
preferred_protocol = self.connection.kernel_ws_protocol
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'kernel_ws_protocol'
[E 2025-03-22 22:38:37.458 ServerApp] {
"Host": "localhost:8888",
"User-Agent": "Python/3.11 websockets/15.0.1"
}
[E 2025-03-22 22:38:37.458 ServerApp] 500 GET /api/kernels/10408737-a189-49b3-8771-f1f83cbbf61a/channels (987140793dfe407fa4741645782beddf@127.0.0.1) 60037.91ms referer=None
Open-WebUI Logs:
2025-03-22 22:37:45.418 | ERROR | open_webui.utils.code_interpreter:run:77 - execute code failed, timed out during opening handshake - {}
Traceback (most recent call last):
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\websockets\asyncio\client.py", line 543, in __await_impl__
await self.connection.handshake(
│ │ └ <function ClientConnection.handshake at 0x0000014A22C10B80>
│ └ <websockets.asyncio.client.ClientConnection object at 0x0000014A306DA690>
└ <websockets.asyncio.client.connect object at 0x0000014A1A332A10>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\websockets\asyncio\client.py", line 104, in handshake
await asyncio.wait(
│ └ <function wait at 0x00000149D2A50680>
└ <module 'asyncio' from 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\\...
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\tasks.py", line 428, in wait
return await _wait(fs, timeout, return_when, loop)
│ │ │ │ └ <ProactorEventLoop running=True closed=False debug=False>
│ │ │ └ 'FIRST_COMPLETED'
│ │ └ None
│ └ {<Future pending>, <Future pending>}
└ <function _wait at 0x00000149D2A50860>
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\tasks.py", line 535, in _wait
await waiter
└ <Future cancelled>
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\websockets\asyncio\client.py", line 539, in __await_impl__
async with asyncio_timeout(self.open_timeout):
│ │ └ 10
│ └ <websockets.asyncio.client.connect object at 0x0000014A1A332A10>
└ <function timeout at 0x00000149D2A78180>
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\timeouts.py", line 115, in __aexit__
raise TimeoutError from exc_val
└ CancelledError()
TimeoutError
The above exception was the direct cause of the following exception:
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\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\Scripts\open-webui.exe\__main__.py", line 7, in <module>
sys.exit(app())
│ │ └ <typer.main.Typer object at 0x00000149D1EC56D0>
│ └ <built-in function exit>
└ <module 'sys' (built-in)>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\typer\main.py", line 322, in __call__
return get_command(self)(*args, **kwargs)
│ │ │ └ {}
│ │ └ ()
│ └ <typer.main.Typer object at 0x00000149D1EC56D0>
└ <function get_command at 0x00000149D2911B20>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\click\core.py", line 1161, in __call__
return self.main(*args, **kwargs)
│ │ │ └ {}
│ │ └ ()
│ └ <function TyperGroup.main at 0x00000149D28EE520>
└ <TyperGroup >
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\typer\core.py", line 740, in main
return _main(
└ <function _main at 0x00000149D28ED760>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\typer\core.py", line 195, in _main
rv = self.invoke(ctx)
│ │ └ <click.core.Context object at 0x00000149D2D1F890>
│ └ <function MultiCommand.invoke at 0x00000149D21BFB00>
└ <TyperGroup >
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\click\core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
│ │ │ │ └ <click.core.Context object at 0x00000149D2D1F8D0>
│ │ │ └ <function Command.invoke at 0x00000149D21BF4C0>
│ │ └ <TyperCommand serve>
│ └ <click.core.Context object at 0x00000149D2D1F8D0>
└ <function MultiCommand.invoke.<locals>._process_result at 0x00000149D2D14680>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\click\core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
│ │ │ │ │ └ {'host': '0.0.0.0', 'port': 8080}
│ │ │ │ └ <click.core.Context object at 0x00000149D2D1F8D0>
│ │ │ └ <function serve at 0x00000149D2D144A0>
│ │ └ <TyperCommand serve>
│ └ <function Context.invoke at 0x00000149D21BDE40>
└ <click.core.Context object at 0x00000149D2D1F8D0>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\click\core.py", line 788, in invoke
return __callback(*args, **kwargs)
│ └ {'host': '0.0.0.0', 'port': 8080}
└ ()
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\typer\main.py", line 697, in wrapper
return callback(**use_params)
│ └ {'host': '0.0.0.0', 'port': 8080}
└ <function serve at 0x00000149D2B8A7A0>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\open_webui\__init__.py", line 77, in serve
uvicorn.run(open_webui.main.app, host=host, port=port, forwarded_allow_ips="*")
│ │ │ │ │ │ └ 8080
│ │ │ │ │ └ '0.0.0.0'
│ │ │ │ └ <fastapi.applications.FastAPI object at 0x0000014A01AE9410>
│ │ │ └ <module 'open_webui.main' from 'C:\\Users\\shahh\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p...
│ │ └ <module 'open_webui' from 'C:\\Users\\shahh\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\Lo...
│ └ <function run at 0x00000149D2B8A700>
└ <module 'uvicorn' from 'C:\\Users\\shahh\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\Local...
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\uvicorn\main.py", line 579, in run
server.run()
│ └ <function Server.run at 0x00000149D2B8A980>
└ <uvicorn.server.Server object at 0x0000014A1A453E50>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\uvicorn\server.py", line 66, in run
return asyncio.run(self.serve(sockets=sockets))
│ │ │ │ └ None
│ │ │ └ <function Server.serve at 0x00000149D2B8AA20>
│ │ └ <uvicorn.server.Server object at 0x0000014A1A453E50>
│ └ <function run at 0x00000149D29ED120>
└ <module 'asyncio' from 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\\...
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
│ │ └ <coroutine object Server.serve at 0x0000014A1A3F8D60>
│ └ <function Runner.run at 0x00000149D2A57E20>
└ <asyncio.runners.Runner object at 0x0000014A227E5C50>
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
│ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Py...
│ │ └ <function BaseEventLoop.run_until_complete at 0x00000149D2A55A80>
│ └ <ProactorEventLoop running=True closed=False debug=False>
└ <asyncio.runners.Runner object at 0x0000014A227E5C50>
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 641, in run_until_complete
self.run_forever()
│ └ <function ProactorEventLoop.run_forever at 0x00000149D2AC2AC0>
└ <ProactorEventLoop running=True closed=False debug=False>
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 608, in run_forever
self._run_once()
│ └ <function BaseEventLoop._run_once at 0x00000149D2A577E0>
└ <ProactorEventLoop running=True closed=False debug=False>
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 1936, in _run_once
handle._run()
│ └ <function Handle._run at 0x00000149D29E8680>
└ <Handle Task.task_wakeup(<Future cancelled>)>
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\events.py", line 84, in _run
self._context.run(self._callback, *self._args)
│ │ │ │ │ └ <member '_args' of 'Handle' objects>
│ │ │ │ └ <Handle Task.task_wakeup(<Future cancelled>)>
│ │ │ └ <member '_callback' of 'Handle' objects>
│ │ └ <Handle Task.task_wakeup(<Future cancelled>)>
│ └ <member '_context' of 'Handle' objects>
└ <Handle Task.task_wakeup(<Future cancelled>)>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\middleware\base.py", line 140, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
│ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0x0000014A1A5C1080>
│ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x0000014A1A5C0040>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8080), 'cl...
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x0000014A1A457DD0>
└ <open_webui.main.RedirectMiddleware object at 0x0000014A22850F10>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
│ │ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0x0000014A1A5C1080>
│ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x0000014A1A5C0040>
│ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8080), 'cl...
│ │ │ └ <starlette.requests.Request object at 0x0000014A1A3B8D10>
│ │ └ <fastapi.routing.APIRouter object at 0x0000014A01AE9790>
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x0000014A1A457DD0>
└ <function wrap_app_handling_exceptions at 0x00000149D62D6980>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000014A1A5C2F20>
│ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x0000014A1A5C0040>
│ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8080), 'cl...
└ <fastapi.routing.APIRouter object at 0x0000014A01AE9790>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\routing.py", line 714, in __call__
await self.middleware_stack(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000014A1A5C2F20>
│ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x0000014A1A5C0040>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8080), 'cl...
│ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x0000014A01AE9790>>
└ <fastapi.routing.APIRouter object at 0x0000014A01AE9790>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\routing.py", line 734, in app
await route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000014A1A5C2F20>
│ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x0000014A1A5C0040>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8080), 'cl...
│ └ <function Route.handle at 0x00000149D62D7EC0>
└ APIRoute(path='/api/v1/utils/code/execute', name='execute_code', methods=['POST'])
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\routing.py", line 288, in handle
await self.app(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000014A1A5C2F20>
│ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x0000014A1A5C0040>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8080), 'cl...
│ └ <function request_response.<locals>.app at 0x0000014A22823C40>
└ APIRoute(path='/api/v1/utils/code/execute', name='execute_code', methods=['POST'])
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000014A1A5C2F20>
│ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x0000014A1A5C0040>
│ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8080), 'cl...
│ │ └ <starlette.requests.Request object at 0x0000014A306957D0>
│ └ <function request_response.<locals>.app.<locals>.app at 0x0000014A1A5C2C00>
└ <function wrap_app_handling_exceptions at 0x00000149D62D6980>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000014A1A5C0540>
│ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x0000014A1A5C0040>
│ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8080), 'cl...
└ <function request_response.<locals>.app.<locals>.app at 0x0000014A1A5C2C00>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\routing.py", line 73, in app
response = await f(request)
│ └ <starlette.requests.Request object at 0x0000014A306957D0>
└ <function get_request_handler.<locals>.app at 0x0000014A22823E20>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\fastapi\routing.py", line 301, in app
raw_response = await run_endpoint_function(
└ <function run_endpoint_function at 0x00000149D631DD00>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\fastapi\routing.py", line 212, in run_endpoint_function
return await dependant.call(**values)
│ │ └ {'user': UserModel(id='5f8f77dd-4631-4872-9755-8a4b4ce82d67', name='Harshit Shah', email='shahharshit063@gmail.com', role='ad...
│ └ <function execute_code at 0x0000014A01963E20>
└ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant...
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\open_webui\routers\utils.py", line 51, in execute_code
output = await execute_code_jupyter(
└ <function execute_code_jupyter at 0x0000014A01962200>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\open_webui\utils\code_interpreter.py", line 209, in execute_code_jupyter
result = await executor.run()
│ └ <function JupyterCodeExecuter.run at 0x0000014A01962D40>
└ <open_webui.utils.code_interpreter.JupyterCodeExecuter object at 0x0000014A1A5BB110>
> File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\open_webui\utils\code_interpreter.py", line 75, in run
await self.execute_code()
│ └ <function JupyterCodeExecuter.execute_code at 0x0000014A01962FC0>
└ <open_webui.utils.code_interpreter.JupyterCodeExecuter object at 0x0000014A1A5BB110>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\open_webui\utils\code_interpreter.py", line 132, in execute_code
async with websockets.connect(
└ <module 'websockets' from 'C:\\Users\\shahh\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\Lo...
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\websockets\asyncio\client.py", line 587, in __aenter__
return await self
└ <websockets.asyncio.client.connect object at 0x0000014A1A332A10>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\websockets\asyncio\client.py", line 578, in __await_impl__
raise TimeoutError("timed out during opening handshake") from exc
└ <class 'TimeoutError'>
TimeoutError: timed out during opening handshake
Additional Information
I am using the following jupyter command: jupyter notebook --ip=0.0.0.0 --no-browser --allow-root --NotebookApp.token='' --NotebookApp.disable_check_xsrf=True
Both open-webui and jupyter run on same machine and are installed using python (pip)
Originally created by @ghost on GitHub (Mar 22, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11957
### Check Existing Issues
- [x] I have searched the existing issues and discussions.
- [x] I am using the latest version of Open WebUI.
### Installation Method
Pip Install
### Open WebUI Version
Latest
### Ollama Version (if applicable)
_No response_
### Operating System
Windows 11 Home
### Browser (if applicable)
_No response_
### Confirmation
- [x] I have read and followed all instructions in `README.md`.
- [x] I am using the latest version of **both** Open WebUI and Ollama.
- [x] I have included the browser console logs.
- [x] I have included the Docker container logs.
- [x] I have listed steps to reproduce the bug in detail.
### Expected Behavior
The code should have been executed normally on clicking run.
### Actual Behavior
It shows the following error:
```Error: timed out during opening handshake```
### Steps to Reproduce
1. Generate a code using any model.
2. Click on "Run"
3. Wait for execution output.
### Logs & Screenshots

Jupyter Logs:
```
[I 2025-03-22 22:37:35.321 ServerApp] User 987140793dfe407fa4741645782beddf logged in.
[I 2025-03-22 22:37:35.322 ServerApp] 302 POST /login (987140793dfe407fa4741645782beddf@127.0.0.1) 51.00ms
[I 2025-03-22 22:37:35.390 ServerApp] Kernel started: 10408737-a189-49b3-8771-f1f83cbbf61a
[W 2025-03-22 22:37:37.421 ServerApp] No session ID specified
[I 2025-03-22 22:37:45.429 ServerApp] Kernel shutdown: 10408737-a189-49b3-8771-f1f83cbbf61a
[W 2025-03-22 22:38:37.447 ServerApp] Timeout waiting for kernel_info reply from 10408737-a189-49b3-8771-f1f83cbbf61a
[E 2025-03-22 22:38:37.448 ServerApp] Uncaught exception GET /api/kernels/10408737-a189-49b3-8771-f1f83cbbf61a/channels (127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/kernels/10408737-a189-49b3-8771-f1f83cbbf61a/channels', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\tornado\web.py", line 1790, in _execute
result = await result
^^^^^^^^^^^^
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\jupyter_server\services\kernels\websocket.py", line 66, in get
await super().get(kernel_id=kernel_id)
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\tornado\websocket.py", line 273, in get
await self.ws_connection.accept_connection(self)
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\tornado\websocket.py", line 863, in accept_connection
await self._accept_connection(handler)
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\tornado\websocket.py", line 903, in _accept_connection
self.selected_subprotocol = handler.select_subprotocol(subprotocols)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\jupyter_server\services\kernels\websocket.py", line 88, in select_subprotocol
preferred_protocol = self.connection.kernel_ws_protocol
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'kernel_ws_protocol'
[E 2025-03-22 22:38:37.458 ServerApp] {
"Host": "localhost:8888",
"User-Agent": "Python/3.11 websockets/15.0.1"
}
[E 2025-03-22 22:38:37.458 ServerApp] 500 GET /api/kernels/10408737-a189-49b3-8771-f1f83cbbf61a/channels (987140793dfe407fa4741645782beddf@127.0.0.1) 60037.91ms referer=None
```
Open-WebUI Logs:
```
2025-03-22 22:37:45.418 | ERROR | open_webui.utils.code_interpreter:run:77 - execute code failed, timed out during opening handshake - {}
Traceback (most recent call last):
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\websockets\asyncio\client.py", line 543, in __await_impl__
await self.connection.handshake(
│ │ └ <function ClientConnection.handshake at 0x0000014A22C10B80>
│ └ <websockets.asyncio.client.ClientConnection object at 0x0000014A306DA690>
└ <websockets.asyncio.client.connect object at 0x0000014A1A332A10>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\websockets\asyncio\client.py", line 104, in handshake
await asyncio.wait(
│ └ <function wait at 0x00000149D2A50680>
└ <module 'asyncio' from 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\\...
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\tasks.py", line 428, in wait
return await _wait(fs, timeout, return_when, loop)
│ │ │ │ └ <ProactorEventLoop running=True closed=False debug=False>
│ │ │ └ 'FIRST_COMPLETED'
│ │ └ None
│ └ {<Future pending>, <Future pending>}
└ <function _wait at 0x00000149D2A50860>
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\tasks.py", line 535, in _wait
await waiter
└ <Future cancelled>
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\websockets\asyncio\client.py", line 539, in __await_impl__
async with asyncio_timeout(self.open_timeout):
│ │ └ 10
│ └ <websockets.asyncio.client.connect object at 0x0000014A1A332A10>
└ <function timeout at 0x00000149D2A78180>
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\timeouts.py", line 115, in __aexit__
raise TimeoutError from exc_val
└ CancelledError()
TimeoutError
The above exception was the direct cause of the following exception:
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\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\Scripts\open-webui.exe\__main__.py", line 7, in <module>
sys.exit(app())
│ │ └ <typer.main.Typer object at 0x00000149D1EC56D0>
│ └ <built-in function exit>
└ <module 'sys' (built-in)>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\typer\main.py", line 322, in __call__
return get_command(self)(*args, **kwargs)
│ │ │ └ {}
│ │ └ ()
│ └ <typer.main.Typer object at 0x00000149D1EC56D0>
└ <function get_command at 0x00000149D2911B20>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\click\core.py", line 1161, in __call__
return self.main(*args, **kwargs)
│ │ │ └ {}
│ │ └ ()
│ └ <function TyperGroup.main at 0x00000149D28EE520>
└ <TyperGroup >
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\typer\core.py", line 740, in main
return _main(
└ <function _main at 0x00000149D28ED760>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\typer\core.py", line 195, in _main
rv = self.invoke(ctx)
│ │ └ <click.core.Context object at 0x00000149D2D1F890>
│ └ <function MultiCommand.invoke at 0x00000149D21BFB00>
└ <TyperGroup >
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\click\core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
│ │ │ │ └ <click.core.Context object at 0x00000149D2D1F8D0>
│ │ │ └ <function Command.invoke at 0x00000149D21BF4C0>
│ │ └ <TyperCommand serve>
│ └ <click.core.Context object at 0x00000149D2D1F8D0>
└ <function MultiCommand.invoke.<locals>._process_result at 0x00000149D2D14680>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\click\core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
│ │ │ │ │ └ {'host': '0.0.0.0', 'port': 8080}
│ │ │ │ └ <click.core.Context object at 0x00000149D2D1F8D0>
│ │ │ └ <function serve at 0x00000149D2D144A0>
│ │ └ <TyperCommand serve>
│ └ <function Context.invoke at 0x00000149D21BDE40>
└ <click.core.Context object at 0x00000149D2D1F8D0>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\click\core.py", line 788, in invoke
return __callback(*args, **kwargs)
│ └ {'host': '0.0.0.0', 'port': 8080}
└ ()
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\typer\main.py", line 697, in wrapper
return callback(**use_params)
│ └ {'host': '0.0.0.0', 'port': 8080}
└ <function serve at 0x00000149D2B8A7A0>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\open_webui\__init__.py", line 77, in serve
uvicorn.run(open_webui.main.app, host=host, port=port, forwarded_allow_ips="*")
│ │ │ │ │ │ └ 8080
│ │ │ │ │ └ '0.0.0.0'
│ │ │ │ └ <fastapi.applications.FastAPI object at 0x0000014A01AE9410>
│ │ │ └ <module 'open_webui.main' from 'C:\\Users\\shahh\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p...
│ │ └ <module 'open_webui' from 'C:\\Users\\shahh\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\Lo...
│ └ <function run at 0x00000149D2B8A700>
└ <module 'uvicorn' from 'C:\\Users\\shahh\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\Local...
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\uvicorn\main.py", line 579, in run
server.run()
│ └ <function Server.run at 0x00000149D2B8A980>
└ <uvicorn.server.Server object at 0x0000014A1A453E50>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\uvicorn\server.py", line 66, in run
return asyncio.run(self.serve(sockets=sockets))
│ │ │ │ └ None
│ │ │ └ <function Server.serve at 0x00000149D2B8AA20>
│ │ └ <uvicorn.server.Server object at 0x0000014A1A453E50>
│ └ <function run at 0x00000149D29ED120>
└ <module 'asyncio' from 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\\...
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
│ │ └ <coroutine object Server.serve at 0x0000014A1A3F8D60>
│ └ <function Runner.run at 0x00000149D2A57E20>
└ <asyncio.runners.Runner object at 0x0000014A227E5C50>
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
│ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Py...
│ │ └ <function BaseEventLoop.run_until_complete at 0x00000149D2A55A80>
│ └ <ProactorEventLoop running=True closed=False debug=False>
└ <asyncio.runners.Runner object at 0x0000014A227E5C50>
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 641, in run_until_complete
self.run_forever()
│ └ <function ProactorEventLoop.run_forever at 0x00000149D2AC2AC0>
└ <ProactorEventLoop running=True closed=False debug=False>
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 608, in run_forever
self._run_once()
│ └ <function BaseEventLoop._run_once at 0x00000149D2A577E0>
└ <ProactorEventLoop running=True closed=False debug=False>
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 1936, in _run_once
handle._run()
│ └ <function Handle._run at 0x00000149D29E8680>
└ <Handle Task.task_wakeup(<Future cancelled>)>
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\events.py", line 84, in _run
self._context.run(self._callback, *self._args)
│ │ │ │ │ └ <member '_args' of 'Handle' objects>
│ │ │ │ └ <Handle Task.task_wakeup(<Future cancelled>)>
│ │ │ └ <member '_callback' of 'Handle' objects>
│ │ └ <Handle Task.task_wakeup(<Future cancelled>)>
│ └ <member '_context' of 'Handle' objects>
└ <Handle Task.task_wakeup(<Future cancelled>)>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\middleware\base.py", line 140, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
│ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0x0000014A1A5C1080>
│ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x0000014A1A5C0040>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8080), 'cl...
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x0000014A1A457DD0>
└ <open_webui.main.RedirectMiddleware object at 0x0000014A22850F10>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
│ │ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0x0000014A1A5C1080>
│ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x0000014A1A5C0040>
│ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8080), 'cl...
│ │ │ └ <starlette.requests.Request object at 0x0000014A1A3B8D10>
│ │ └ <fastapi.routing.APIRouter object at 0x0000014A01AE9790>
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x0000014A1A457DD0>
└ <function wrap_app_handling_exceptions at 0x00000149D62D6980>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000014A1A5C2F20>
│ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x0000014A1A5C0040>
│ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8080), 'cl...
└ <fastapi.routing.APIRouter object at 0x0000014A01AE9790>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\routing.py", line 714, in __call__
await self.middleware_stack(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000014A1A5C2F20>
│ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x0000014A1A5C0040>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8080), 'cl...
│ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x0000014A01AE9790>>
└ <fastapi.routing.APIRouter object at 0x0000014A01AE9790>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\routing.py", line 734, in app
await route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000014A1A5C2F20>
│ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x0000014A1A5C0040>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8080), 'cl...
│ └ <function Route.handle at 0x00000149D62D7EC0>
└ APIRoute(path='/api/v1/utils/code/execute', name='execute_code', methods=['POST'])
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\routing.py", line 288, in handle
await self.app(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000014A1A5C2F20>
│ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x0000014A1A5C0040>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8080), 'cl...
│ └ <function request_response.<locals>.app at 0x0000014A22823C40>
└ APIRoute(path='/api/v1/utils/code/execute', name='execute_code', methods=['POST'])
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000014A1A5C2F20>
│ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x0000014A1A5C0040>
│ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8080), 'cl...
│ │ └ <starlette.requests.Request object at 0x0000014A306957D0>
│ └ <function request_response.<locals>.app.<locals>.app at 0x0000014A1A5C2C00>
└ <function wrap_app_handling_exceptions at 0x00000149D62D6980>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000014A1A5C0540>
│ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x0000014A1A5C0040>
│ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8080), 'cl...
└ <function request_response.<locals>.app.<locals>.app at 0x0000014A1A5C2C00>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\starlette\routing.py", line 73, in app
response = await f(request)
│ └ <starlette.requests.Request object at 0x0000014A306957D0>
└ <function get_request_handler.<locals>.app at 0x0000014A22823E20>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\fastapi\routing.py", line 301, in app
raw_response = await run_endpoint_function(
└ <function run_endpoint_function at 0x00000149D631DD00>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\fastapi\routing.py", line 212, in run_endpoint_function
return await dependant.call(**values)
│ │ └ {'user': UserModel(id='5f8f77dd-4631-4872-9755-8a4b4ce82d67', name='Harshit Shah', email='shahharshit063@gmail.com', role='ad...
│ └ <function execute_code at 0x0000014A01963E20>
└ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant...
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\open_webui\routers\utils.py", line 51, in execute_code
output = await execute_code_jupyter(
└ <function execute_code_jupyter at 0x0000014A01962200>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\open_webui\utils\code_interpreter.py", line 209, in execute_code_jupyter
result = await executor.run()
│ └ <function JupyterCodeExecuter.run at 0x0000014A01962D40>
└ <open_webui.utils.code_interpreter.JupyterCodeExecuter object at 0x0000014A1A5BB110>
> File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\open_webui\utils\code_interpreter.py", line 75, in run
await self.execute_code()
│ └ <function JupyterCodeExecuter.execute_code at 0x0000014A01962FC0>
└ <open_webui.utils.code_interpreter.JupyterCodeExecuter object at 0x0000014A1A5BB110>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\open_webui\utils\code_interpreter.py", line 132, in execute_code
async with websockets.connect(
└ <module 'websockets' from 'C:\\Users\\shahh\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\Lo...
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\websockets\asyncio\client.py", line 587, in __aenter__
return await self
└ <websockets.asyncio.client.connect object at 0x0000014A1A332A10>
File "C:\Users\shahh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\websockets\asyncio\client.py", line 578, in __await_impl__
raise TimeoutError("timed out during opening handshake") from exc
└ <class 'TimeoutError'>
TimeoutError: timed out during opening handshake
```
### Additional Information
I am using the following jupyter command:
```jupyter notebook --ip=0.0.0.0 --no-browser --allow-root --NotebookApp.token='' --NotebookApp.disable_check_xsrf=True```
Both open-webui and jupyter run on same machine and are installed using python (pip)
GiteaMirror
added the bug label 2026-05-18 00:50:11 -05:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @ghost on GitHub (Mar 22, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11957
Check Existing Issues
Installation Method
Pip Install
Open WebUI Version
Latest
Ollama Version (if applicable)
No response
Operating System
Windows 11 Home
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
The code should have been executed normally on clicking run.
Actual Behavior
It shows the following error:
Error: timed out during opening handshakeSteps to Reproduce
Logs & Screenshots
Jupyter Logs:
Open-WebUI Logs:
Additional Information
I am using the following jupyter command:
jupyter notebook --ip=0.0.0.0 --no-browser --allow-root --NotebookApp.token='' --NotebookApp.disable_check_xsrf=TrueBoth open-webui and jupyter run on same machine and are installed using python (pip)