incomplete content #7225
Answered
by
Dreamsorcerer
newtester805
asked this question in
Q&A
|
Hello, The problem is that the loop that write the content to file ( |
Answered by
Dreamsorcerer
Feb 26, 2023
Replies: 1 comment 2 replies
This is a context manager, handling the client session. When you exit that block, the session is closed. By the second line of your main() function, both the request and the session have been closed. Therefore, it is not expected to be able to read from the response in the rest of the code. Please see the quickstart and other examples for the correct way to make a request. |
2 replies
Answer selected by
newtester805
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a context manager, handling the client session. When you exit that block, the session is closed.
By the second line of your main() function, both the request and the session have been closed. Therefore, it is not expected to be able to read from the response in the rest of the code.
Please see the quickstart and other examples for the correct way to make a request.