MCPcopy
hub / github.com/encode/httpx / StreamConsumed

Class StreamConsumed

httpx/_exceptions.py:309–324  ·  view source on GitHub ↗

Attempted to read or stream content, but the content has already been streamed.

Source from the content-addressed store, hash-verified

307
308
309class StreamConsumed(StreamError):
310 """
311 Attempted to read or stream content, but the content has already
312 been streamed.
313 """
314
315 def __init__(self) -> None:
316 message = (
317 "Attempted to read or stream some content, but the content has "
318 "already been streamed. For requests, this could be due to passing "
319 "a generator as request content, and then receiving a redirect "
320 "response or a secondary request as part of an authentication flow."
321 "For responses, this could be due to attempting to stream the response "
322 "content more than once."
323 )
324 super().__init__(message)
325
326
327class StreamClosed(StreamError):

Callers 4

__iter__Method · 0.85
__aiter__Method · 0.85
iter_rawMethod · 0.85
aiter_rawMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected