This commit is contained in:
Saif Mahmud
2024-05-13 00:34:52 -05:00
committed by GitHub
parent 27e7f48a44
commit 23f10418d7

View File

@@ -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