diff --git a/python/scripts/prepare_envs.ps1 b/python/scripts/prepare_envs.ps1 index 3fa879dc7..7205bfffa 100644 --- a/python/scripts/prepare_envs.ps1 +++ b/python/scripts/prepare_envs.ps1 @@ -62,6 +62,8 @@ if (-not (Test-Path ".venv")) { } Highlight-Command "uv sync --group dev" uv sync --group dev +# https://stackoverflow.com/questions/74267313/how-to-use-tzdata-file-with-pyarrow-compute-assume-timezone/74292266 +uv run -s "python -c 'import pyarrow.util; pyarrow.util.download_tzdata_on_windows()'" Write-Success "Main environment setup complete." Write-Highlight "==========================================" diff --git a/python/valuecell/agents/research_agent/sources.py b/python/valuecell/agents/research_agent/sources.py index 50f4869f6..51861dbf7 100644 --- a/python/valuecell/agents/research_agent/sources.py +++ b/python/valuecell/agents/research_agent/sources.py @@ -71,7 +71,7 @@ async def _write_and_ingest( period_of_report=period_of_report, filing_date=filing_date, ) - async with aiofiles.open(path, "w") as file: + async with aiofiles.open(path, "w", encoding="utf-8") as file: await file.write(content) result = SECFilingResult(file_name, path, metadata)