Skip to content

Commit

Permalink
csv file fix (#810)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarraann committed Jul 19, 2023
1 parent 92feabf commit 7ed46d9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions superagi/resource_manager/file_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,9 @@ def write_csv_file(self, file_name: str, csv_data):
final_path = ResourceHelper.get_resource_path(file_name)

try:
with open(final_path, mode="w") as file:
with open(final_path, mode="w", newline="") as file:
writer = csv.writer(file, lineterminator="\n")
for row in csv_data:
writer.writerows(row)
writer.writerows(csv_data)
self.write_to_s3(file_name, final_path)
logger.info(f"{file_name} - File written successfully")
return f"{file_name} - File written successfully"
Expand Down

0 comments on commit 7ed46d9

Please sign in to comment.