2 Answers
- Newest
- Most votes
- Most comments
1
Have you tried doing bite = io.BytesIO(csv_content)
again before the second function call?
0
If your first function uses bite.read()
to get the content of the buffer, the internal buffer cursor will be advanced to the end of the buffer and a subsequent read()
call will return an empty buffer. You can reset the cursor to the beginning of the buffer using bite.seek(0)
. Alternatively, if you can control how the functions you invoke are reading data from the buffer, you could usebite.getvalue()
.
Thanks for your proposed solution, I used the above answer and it works well now.
Relevant content
- asked 3 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 5 months ago
Thanks!! It works well, Why we put it again with the second function?