fix: CTP 连接后 locale 崩溃,PM2 设置 LANG=C.UTF-8
vnpy_ctp C++ 扩展在缺 locale 时会 terminate;补充 SimNow 备用前置说明。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,6 +7,10 @@ import threading
|
||||
import time
|
||||
from typing import Any, Optional
|
||||
|
||||
# vnpy_ctp C++ 在部分 Linux 上缺 locale 会抛 std::runtime_error
|
||||
os.environ.setdefault("LANG", "C.UTF-8")
|
||||
os.environ.setdefault("LC_ALL", "C.UTF-8")
|
||||
|
||||
from ctp_symbol import ths_to_vnpy_symbol, to_vnpy_exchange
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
Reference in New Issue
Block a user