From 23f10418d7ee48372259807cb83e07675fcc9a1c Mon Sep 17 00:00:00 2001 From: Saif Mahmud <60409889+vmsaif@users.noreply.github.com> Date: Mon, 13 May 2024 00:34:52 -0500 Subject: [PATCH] Fixes #603 (#604) --- src/crewai/task.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crewai/task.py b/src/crewai/task.py index 5662239f1..6f17ea033 100644 --- a/src/crewai/task.py +++ b/src/crewai/task.py @@ -305,7 +305,7 @@ class Task(BaseModel): if directory and not os.path.exists(directory): os.makedirs(directory) - with open(self.output_file, "w") as file: # type: ignore # Argument 1 to "open" has incompatible type "str | None"; expected "int | str | bytes | PathLike[str] | PathLike[bytes]" + with open(self.output_file, "w", encoding='utf-8') as file: # type: ignore # Argument 1 to "open" has incompatible type "str | None"; expected "int | str | bytes | PathLike[str] | PathLike[bytes]" file.write(result) return None