We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If you call the iter* methods more than once for a single streamed request, it fails with an extremely unhelpful error:
iter*
>>> r = requests.get('http://www.google.com/', stream=True) >>> [x for x in r.iter_content(1024)] >>> [x for x in r.iter_content(1024)] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/site-packages/requests/utils.py", line 341, in iter_slices while pos < len(string): TypeError: object of type 'bool' has no len()
I think it's fine that you can't call the iter* methods twice on a streamed response, but we can easily catch this situation so we should.
The text was updated successfully, but these errors were encountered:
I'm making a pull request with a RuntimeError being raised. What kind of exception would you ideally like to throw here?
RuntimeError
Sorry, something went wrong.
I'm going to close this to centralise on #2241.
No branches or pull requests
If you call the
iter*
methods more than once for a single streamed request, it fails with an extremely unhelpful error:I think it's fine that you can't call the iter* methods twice on a streamed response, but we can easily catch this situation so we should.
The text was updated successfully, but these errors were encountered: