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
So the raised error is not clear enough to figure out the actual problem.
Version:
uvicorn: 0.17.6 with CPython 3.10.2 on Windows
starlette: 0.19.0
The text was updated successfully, but these errors were encountered:
TrulyBright
changed the title
Path() and Mount() sharing same path blocks websocket with AssertionError: assert scope["type"] == "http"
Route() and Mount() sharing same path blocks websocket with AssertionError: assert scope["type"] == "http"
Mar 19, 2022
TrulyBright
changed the title
Route() and Mount() sharing same path blocks websocket with AssertionError: assert scope["type"] == "http"
Route() and Mount() sharing same path block websocket with AssertionError: assert scope["type"] == "http"
Mar 19, 2022
TrulyBright
changed the title
Route() and Mount() sharing same path block websocket with AssertionError: assert scope["type"] == "http"
Path of Mount() being the initial substring of WebSocketRoute()'s blocks websocket with AssertionError: assert scope["type"] == "http"
Mar 19, 2022
It solves the error to insert all WebSocketRoute()s before Mount() into routes, without modifying their paths, though the actual problem is the unclearness of the raised error.
app=Starlette(debug=True, routes=[
WebSocketRoute("/foo", endpoint),
Mount("/", StaticFiles(directory="dist")),
]) # works fine
Panicking code (
uvicorn panicking:app
):The raised error log when I tried connecting to
ws://localhost:8000/foo
:Working code where the path of
WebSocketRoute
no longer starts with that ofMount
(uvicorn working:app
):So the raised error is not clear enough to figure out the actual problem.
Version:
The text was updated successfully, but these errors were encountered: