Skip to content

Commit

Permalink
fix: ensure csv file is opened as a string not binary
Browse files Browse the repository at this point in the history
  • Loading branch information
as1729 committed Sep 20, 2024
1 parent d8ab9f7 commit 32c0e49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/src/functions/generate_treasury_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 32c0e49

Please sign in to comment.