Skip to content

Weird behavior for StreamingBody iter_lines #3275

Answered by tim-finnigan
devfox-se asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @devfox-se thanks for sharing the logs. It looks like what you want to do is just call iter_lines() once and then iterate on it. For example:

iterator = body.iter_lines()
print(next(iterator))
print(next(iterator))

Is that what you’re trying to do? Here is documentation for reference: https://botocore.amazonaws.com/v1/documentation/api/latest/reference/response.html

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tim-finnigan
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #3273 on May 20, 2022 19:25.