2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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.
Contenus pertinents
- demandé il y a un an
- demandé il y a 6 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 4 mois
- AWS OFFICIELA mis à jour il y a 2 ans
Thanks!! It works well, Why we put it again with the second function?