diff --git a/vn.docker/server_vnpy.sh b/vn.docker/server_vnpy.sh index b4a8ab99..4c5490bf 100755 --- a/vn.docker/server_vnpy.sh +++ b/vn.docker/server_vnpy.sh @@ -3,7 +3,7 @@ cd .. docker run --name vnpy --rm \ -v `pwd`:/srv/vnpy \ - -v `pwd`/../vn.trader/VT_setting.json:/etc/vnpy/VT_setting.json \ + -v `pwd`/vn.trader/tmp/VT_setting.json:/etc/vnpy/VT_setting.json \ -p 2014:2014 -p 602:602 \ vnpy:latest \ python /srv/vnpy/vn.trader/vtServer.py --VT_setting /etc/vnpy/VT_setting.json diff --git a/vn.trader/gateway/windGateway/windGateway.py b/vn.trader/gateway/windGateway/windGateway.py index 53d90653..1e04c8cc 100644 --- a/vn.trader/gateway/windGateway/windGateway.py +++ b/vn.trader/gateway/windGateway/windGateway.py @@ -9,7 +9,7 @@ from copy import copy try: from WindPy import w except ImportError: - print u'请先安装WindPy接口' + print(u'请先安装WindPy接口') from vtGateway import * diff --git a/vn.trader/vtServer.py b/vn.trader/vtServer.py index e85c04f4..1c137932 100644 --- a/vn.trader/vtServer.py +++ b/vn.trader/vtServer.py @@ -1,5 +1,8 @@ # encoding: utf-8 +import sys +reload(sys) +sys.setdefaultencoding('utf-8') import vtGlobal import json import os @@ -66,7 +69,7 @@ class VtServer(RpcServer): #---------------------------------------------------------------------- def printLog(content): """打印日志""" - print datetime.now().strftime("%H:%M:%S"), '\t', content + print(datetime.now().strftime("%H:%M:%S"), '\t', content) #----------------------------------------------------------------------