Warning: StreamingHttpResponse must consume synchronous iterators in order to serve them asynchronously. Use an asynchronous iterator instead.
My application does not explicitly use StreamingHttpResponse or FileResponse in any of its views and I still keep getting this warning every time my application starts. The application is served under ASGI using Uvicorn. Any suggestions how do I get rid of this warning?
See the thread at StreamingHttpResponse must consume synchronous iterators for some ideas on how to track this down.
Note that it’s possible that this is being caused by a third-party library and not your code, so you’ll need to check those out too.
The latest comment on the thread ('Sept 23) still does not have any resolution. I myself tried to look at the thread and its suggestions before raising one of my own.
My code does use django-browser-reload which has a section in its documentation that might give some insights into solving this issue-
django-browser-reload · PyPI.
However, I am not able to figure out what I need to do in order to stop it from consuming the synchronous iterator. Any help would be appreciated.
Since that (django-browser-reload) is a third-party library, I suggest you pursue this in that project. Start by looking at the issues (both open and closed) to see if there’s a solution for this.
If not, you may want to open this as an issue in that project.