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
The newest version of starlette gives a crash when initializing the sub_response on this line.
Specifically, setting status_code=None prevents the Response from initializing due to the code in Starlette's Response.init_headers() on this line.
Stack Trace
.tox/python-framework_strawberry-py39-strawberrylatest/lib/python3.9/site-packages/strawberry/asgi/__init__.py:45: in __call__
await self.http_handler_class(
.tox/python-framework_strawberry-py39-strawberrylatest/lib/python3.9/site-packages/strawberry/asgi/handlers/http_handler.py:38: in handle
sub_response = Response(
../../Packages/starlette/starlette/responses.py:50: in __init__
self.init_headers(headers)
def init_headers(self, headers: typing.Mapping[str, str] = None) -> None:
if headers is None:
raw_headers: typing.List[typing.Tuple[bytes, bytes]] = []
populate_content_length = True
populate_content_type = True
else:
raw_headers = [
(k.lower().encode("latin-1"), v.encode("latin-1"))
for k, v in headers.items()
]
keys = [h[0] for h in raw_headers]
populate_content_length = b"content-length" not in keys
populate_content_type = b"content-type" not in keys
body = getattr(self, "body", None)
if (
body is not None
and populate_content_length
> and not (self.status_code < 200 or self.status_code in (204, 304))
):
E TypeError: '<' not supported between instances of 'NoneType' and 'int'
The text was updated successfully, but these errors were encountered:
Overview
The newest version of starlette gives a crash when initializing the sub_response on this line.
Specifically, setting
status_code=None
prevents the Response from initializing due to the code in Starlette'sResponse.init_headers()
on this line.Stack Trace
The text was updated successfully, but these errors were encountered: