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
Some ASGI servers, such as uvicorn, will sometimes pass a scope object to WsgiToAsgi where scope["server"] is set to None. This causes the app to crash when build_environ tries to access scope["server"] like a tuple (here).
However, extending the check to include that scope["server"] is not None would be an imperfect fix, because it would set SERVER_NAME and SERVER_PORT to "localhost:80" when in some cases that's not true - for example, when launching uvicorn bound to a Unix socket. This latter issue likely needs to be fixed in the server code, though.