Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Dicklesworthstone committed May 21, 2024
1 parent 2441f8a commit ee7a7dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ async def read_and_rewrite_file_with_safe_encoding(temp_file_path: str):
traceback.print_exc()
raise HTTPException(status_code=400, detail=f"Error while reading and decoding file: {e}")
try:
with open(temp_file_path, 'w', encoding='utf-8') as buffer:
with open(temp_file_path, 'wb') as buffer:
buffer.write(content)
except Exception as e:
logger.error(f"Error while writing file with utf-8 encoding: {e}")
Expand Down

0 comments on commit ee7a7dc

Please sign in to comment.