버그 수정 — 스케줄러 한글 경로 깨짐 + Python 로그 UTF-8 강제

- setup_scheduler.ps1: chcp 65001, StockBot_Bot 제거, XML 경로 자동 교정
- run_morning/midday/evening.ps1: chcp 65001 + PYTHONUTF8=1 추가
- app/main.py: sys.stdout.reconfigure(encoding=utf-8) 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 13:54:15 +09:00
parent 12956919f6
commit 1690f4e248
5 changed files with 44 additions and 7 deletions
+7
View File
@@ -12,6 +12,7 @@ main.py
DRY_RUN=true → 신호만 확인, 주문 전송 안 함
"""
import io
import json
import os
import sys
@@ -20,6 +21,12 @@ import logging
from datetime import datetime, time
from pathlib import Path
# 한글 로그 깨짐 방지 — stdout을 UTF-8로 강제
if hasattr(sys.stdout, "reconfigure"):
sys.stdout.reconfigure(encoding="utf-8")
elif hasattr(sys.stdout, "buffer"):
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8", line_buffering=True)
# .env 로드
def load_env():
env_path = Path(".env")