mirror of
https://ghfast.top/https://github.com/aeroxw/tick-stock-panel.git
synced 2026-09-12 17:54:15 +08:00
StockPanel: - 财务指标请求增加 FINANCIAL 能力判断, 无能力时不请求 (修复 free/starter 点个股弹 'capability not available: financial' 报错) Indices: - 指数分时区无 kline.minute.batch (Pro+) 能力时显示锁提示, 不请求接口 ConceptAnalysis: - 配置的 configId 失效 (扩展数据被删) 时自动回退 pickBestConfig, 避免报错 - 空状态也显示配置按钮, 让用户能重新选择数据源 ExtDimensionAnalysis: - 顶部数据源/分组字段配置区始终显示 (去掉 !menu 条件)
16 lines
540 B
Python
16 lines
540 B
Python
"""TickFlow Stock Panel backend."""
|
|
|
|
import sys
|
|
|
|
__version__ = "0.1.40"
|
|
|
|
# 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
|