From 32c0e4998340135f65006216b346c16c06ca64b5 Mon Sep 17 00:00:00 2001 From: Aditya Sridhar Date: Fri, 20 Sep 2024 14:18:02 -0400 Subject: [PATCH] fix: ensure csv file is opened as a string not binary --- python/src/functions/generate_treasury_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/src/functions/generate_treasury_report.py b/python/src/functions/generate_treasury_report.py index ab7c7604..2f01f92d 100644 --- a/python/src/functions/generate_treasury_report.py +++ b/python/src/functions/generate_treasury_report.py @@ -229,7 +229,7 @@ def process_event(payload: ProjectLambdaPayload, logger: structlog.stdlib.BoundL file=new_output_file, ) # Output CSV file for treasury - with tempfile.NamedTemporaryFile("rb+") as csv_file: + with tempfile.NamedTemporaryFile("r+") as csv_file: convert_xlsx_to_csv(csv_file, output_workbook, highest_row_num) upload_generated_file_to_s3( client=s3_client,