Files
tick-stock-panel/backend/app/__init__.py
T
shy3130 02be6dede8 fix(ci): PyInstaller 产物输出到 backend/dist, 与 tickflow.iss Source 路径一致
修复 Inno Setup 找不到打包产物的错误:
  No files found matching ..\backend\dist\TickFlowStockPanel\*
原因: workflow 用 --distpath ../dist 输出到项目根 dist/, 但 .iss 引用的是 backend/dist/
修复: PyInstaller 用默认输出 (backend/dist), DMG/Linux 步骤路径同步调整
2026-06-25 00:35:13 +08:00

16 lines
540 B
Python

"""TickFlow Stock Panel backend."""
import sys
__version__ = "0.1.44"
# Windows 默认 stdout/stderr 编码为 GBK(cp936),TickFlow SDK 内部输出含 emoji 的
# 指数/标的名称(如 \U0001f193)时会抛 UnicodeEncodeError,导致请求失败。
# 进程加载最早阶段强制 UTF-8,根治此类编码崩溃。
for _stream in (sys.stdout, sys.stderr):
if hasattr(_stream, "reconfigure"):
try:
_stream.reconfigure(encoding="utf-8", errors="replace")
except Exception: # noqa: BLE001
pass