mirror of
https://github.com/farcasclaudiu/TradingAgents.git
synced 2026-06-28 23:01:28 +03:00
fix: use explicit encoding="utf-8" for all file I/O so Windows users avoid cp1252 crashes (#543, #550, #576)
This commit is contained in:
@@ -8,7 +8,7 @@ SavePathType = Annotated[str, "File path to save data. If None, data is not save
|
||||
|
||||
def save_output(data: pd.DataFrame, tag: str, save_path: SavePathType = None) -> None:
|
||||
if save_path:
|
||||
data.to_csv(save_path)
|
||||
data.to_csv(save_path, encoding="utf-8")
|
||||
print(f"{tag} saved to {save_path}")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user