-
Notifications
You must be signed in to change notification settings - Fork 1.1k
AttributeError: This StreamingHttpResponse instance has no content
attribute. Use streaming_content
instead.
#1945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Downgrading to 4.4.2 fixes the issue. |
Thanks for the report. The new alerts panel should have a check for streaming responses. Do you want to submit a fix for this? |
Not very familiar with the code but presumably a check needed here ? def generate_stats(self, request, response):
html_content = response.content.decode(response.charset) |
I wondered for a moment what's going on since we are already checking for streaming responses, but that's only when we check if we should insert the toolbar's HTML, not when generating the stats. So yes, the I think we would want a unit test for this as well since we didn't catch this problem in time. |
I wonder if we should do something like we're doing with async and have a streaming compatible attribute on the panels that prevents the panel from attempting to process these responses. |
This appears to happen when returning a
FileResponse
. The issue looks like a regression in 4.4.3.The text was updated successfully, but these errors were encountered: