Open AGhost-7 opened 3 years ago
Same issue with the sync version, with the latest release (v4.2.1).
Sample code to reproduce:
with httpx.stream("GET", "<URL>") as response:
for chunk in response.iter_bytes():
print(chunk)
Error:
cassette = <vcr.cassette.Cassette object at 0x7f3430d1aa10>, real_send = <function Client.send at 0x7f34369e7d90>, args = (<httpx.Client object at 0x7f3430d2dba0>,)
kwargs = {'auth': None, 'follow_redirects': False, 'request': <Request('GET', '<URL>')>, 'stream': True}
def _shared_vcr_send(cassette, real_send, *args, **kwargs):
> real_request = args[1]
E IndexError: tuple index out of range
.venv/lib/python3.10/site-packages/vcr/stubs/httpx_stubs.py:79: IndexError
This works fine with get
instead of stream
:
response = httpx.get("<URL>")
for chunk in response.iter_bytes():
print(chunk)
I suggest we close this one in view of #784
Steps to reproduce: