StreamingHttpResponse must consume synchronous iterators

I know this post is ancient (mea culpa), but I landed here during an upgrade project from Django 3.X to Django 4.2 with this exception.

A possible culprit of your error may be the whitenoise package. It was raising this warning when running under ASGI. As of whitenoise==6.9.0 (current), there’s no ASGI support. If you’re using whitenoise & hitting this warning, you may want to investigate either:

  • ServeStatic: A fork of whitenoise w/ ASGI & other bugfixes
  • blacknoise: Inspired by whitenoise & directly aimed at ASGI support
2 Likes