From eaeae8988406484c957a327b3b911ad76ceb48a2 Mon Sep 17 00:00:00 2001 From: Zhaofeng Zhang <24791380+vcfgv@users.noreply.github.com> Date: Fri, 10 Oct 2025 12:19:17 +0800 Subject: [PATCH 1/3] fix: ensure UTF-8 encoding for Windows environments in __init__.py --- python/valuecell/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/valuecell/__init__.py b/python/valuecell/__init__.py index e49b81bb3..3546dcffe 100644 --- a/python/valuecell/__init__.py +++ b/python/valuecell/__init__.py @@ -1,3 +1,5 @@ +import os + """ValueCell - A community-driven, multi-agent platform for financial applications.""" __version__ = "0.1.0" @@ -17,3 +19,6 @@ # registers agents on import import valuecell.agents as _ # noqa: F401 + +if os.name == "nt": + os.environ["PYTHONIOENCODING"] = "utf-8" \ No newline at end of file From 92be98d3cacbb25eeb0411169fc52b55f6c852fb Mon Sep 17 00:00:00 2001 From: Zhaofeng Zhang <24791380+vcfgv@users.noreply.github.com> Date: Fri, 10 Oct 2025 13:44:06 +0800 Subject: [PATCH 2/3] fix lint --- python/valuecell/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/python/valuecell/__init__.py b/python/valuecell/__init__.py index 3546dcffe..9fce860d3 100644 --- a/python/valuecell/__init__.py +++ b/python/valuecell/__init__.py @@ -17,8 +17,5 @@ "__description__", ] -# registers agents on import -import valuecell.agents as _ # noqa: F401 - if os.name == "nt": - os.environ["PYTHONIOENCODING"] = "utf-8" \ No newline at end of file + os.environ["PYTHONIOENCODING"] = "utf-8" From 241d6227bf5ae29712c10b3c6bb15f8bad640d60 Mon Sep 17 00:00:00 2001 From: Zhaofeng Zhang <24791380+vcfgv@users.noreply.github.com> Date: Fri, 10 Oct 2025 13:47:49 +0800 Subject: [PATCH 3/3] fix: add PYTHONIOENCODING to .env.example and remove unnecessary os check in __init__.py --- .env.example | 1 + python/valuecell/__init__.py | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.env.example b/.env.example index f1e8cbdf9..055aaffc3 100644 --- a/.env.example +++ b/.env.example @@ -13,6 +13,7 @@ API_PORT=8000 # Ensure UTF-8 encoding LANG=en_US.UTF-8 TIMEZONE=America/New_York +PYTHONIOENCODING=utf-8 # Agent Settings AGENT_DEBUG_MODE=false diff --git a/python/valuecell/__init__.py b/python/valuecell/__init__.py index 9fce860d3..a4e93b21d 100644 --- a/python/valuecell/__init__.py +++ b/python/valuecell/__init__.py @@ -1,5 +1,3 @@ -import os - """ValueCell - A community-driven, multi-agent platform for financial applications.""" __version__ = "0.1.0" @@ -16,6 +14,3 @@ "__author__", "__description__", ] - -if os.name == "nt": - os.environ["PYTHONIOENCODING"] = "utf-8"