Skip to content

Commit

Permalink
add encoding to avoid error in windows (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
rezawr authored Nov 23, 2024
1 parent c23d248 commit 335d798
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py_zerox/pyzerox/core/zerox.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ async def zerox(
# Write the aggregated markdown to a file
if output_dir:
result_file_path = os.path.join(output_dir, f"{file_name}.md")
async with aiofiles.open(result_file_path, "w") as f:
async with aiofiles.open(result_file_path, "w", encoding="utf-8") as f:
await f.write("\n\n".join(aggregated_markdown))

# Cleanup the downloaded PDF file
Expand Down

0 comments on commit 335d798

Please sign in to comment.