From 4acc979e7035922c7a9387249c9400d83e41dee9 Mon Sep 17 00:00:00 2001 From: Zhaofeng Zhang <24791380+vcfgv@users.noreply.github.com> Date: Mon, 20 Oct 2025 16:43:10 +0800 Subject: [PATCH 1/2] fix: specify UTF-8 encoding when opening files in _write_and_ingest function --- python/valuecell/agents/research_agent/sources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From 944fcd58bab3dc54cdda9324871fce9c03a2caa5 Mon Sep 17 00:00:00 2001 From: Zhaofeng Zhang <24791380+vcfgv@users.noreply.github.com> Date: Mon, 20 Oct 2025 16:54:22 +0800 Subject: [PATCH 2/2] feat: add command to download tzdata for pyarrow in environment setup --- python/scripts/prepare_envs.ps1 | 2 ++ 1 file changed, 2 insertions(+) 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 "=========================================="