Sophie Courtemanche-Martel
01/26/2022, 4:09 PMstream = io.BytesIO(data.encode())
AttributeError: 'tuple' object has no attribute 'encode'
Kevin Kho
Abdou Seck
01/26/2022, 4:32 PMimport csv, io
with io.StringIO() as fh:
writer = csv.writer(fh, lineterminator='\n', quotechar='"')
writer.writerows(data)
fh.seek(0, 0)
contents_for_s3upload = fh.read()
Then you can pass contents_for_s3upload
to S3Upload.run
.Kevin Kho
Abdou Seck
01/26/2022, 4:34 PMSophie Courtemanche-Martel
01/26/2022, 4:35 PMSophie Courtemanche-Martel
01/26/2022, 4:35 PMS3Results()
but now I have to make sure that I can actually read the results back in the appropriate format!Sophie Courtemanche-Martel
01/26/2022, 4:35 PMSophie Courtemanche-Martel
01/26/2022, 4:36 PMKevin Kho