vn.py官网
开源量化社区
Member
avatar
加入于:
帖子: 24
声望: 0

Traceback (most recent call last):
File "D:\vnstudio D\lib\site-packages\vnstation\cli.py", line 90, in run_trader
module = importlib.import_module(d["module"])
File "D:\vnstudio D\lib\importlib__init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "D:\vnstudio D\lib\site-packages\vnpy\app\cta_strategy\
init.py", line 9, in <module>
from .engine import CtaEngine
File "D:\vnstudio D\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 40, in <module>
from vnpy.trader.database import database_manager
File "D:\vnstudio D\lib\site-packages\vnpy\trader\database\
init__.py", line 9, in <module>
from .initialize import init
File "D:\vnstudio D\lib\site-packages\vnpy\trader\database\initialize.py", line 2, in <module>
from .database import BaseDatabaseManager, Driver
File "D:\vnstudio D\lib\site-packages\vnpy\trader\database\database.py", line 14, in <module>
DB_TZ = timezone(SETTINGS["database.timezone"])
KeyError: 'database.timezone'

Member
avatar
加入于:
帖子: 2643
声望: 157

请在电脑“设置”-“时间和语言”-“日期和时间”处看一下是否选择了本地时区,如果没有,请选择一下自己所在的时区。如果有,请在database对应的地方print一下SETTINGS["database.timezone"]

Administrator
avatar
加入于:
帖子: 4873
声望: 283

这里应该是你的更新不完全出错了,卸载当前版本后转个新的VNStudio 2.1.7吧

Member
avatar
加入于:
帖子: 24
声望: 0

用Python的交易员 wrote:

这里应该是你的更新不完全出错了,卸载当前版本后转个新的VNStudio 2.1.7吧
重新安装了一遍,变这样了:
Traceback (most recent call last):
File "d:\vnstudio\lib\site-packages\pymysql\connections.py", line 571, in connect
**kwargs)
File "d:\vnstudio\lib\socket.py", line 727, in create_connection
raise err
File "d:\vnstudio\lib\socket.py", line 716, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "d:\vnstudio\lib\site-packages\peewee.py", line 3035, in connect
self._state.set_connection(self._connect())
File "d:\vnstudio\lib\site-packages\peewee.py", line 3933, in _connect
conn = mysql.connect(db=self.database, self.connect_params)
File "d:\vnstudio\lib\site-packages\pymysql__init__.py", line 94, in Connect
return Connection(*args,
kwargs)
File "d:\vnstudio\lib\site-packages\pymysql\connections.py", line 327, in init
self.connect()
File "d:\vnstudio\lib\site-packages\pymysql\connections.py", line 619, in connect
raise exc
pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' ([WinError 10061] 由于目标计算机积极拒绝,无法连接。)")

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "d:\vnstudio\lib\site-packages\vnstation\cli.py", line 90, in run_trader
module = importlib.import_module(d["module"])
File "d:\vnstudio\lib\importlib__init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "d:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\
init.py", line 9, in <module>
from .engine import CtaEngine
File "d:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 40, in <module>
from vnpy.trader.database import database_manager
File "d:\vnstudio\lib\site-packages\vnpy\trader\database\
init.py", line 12, in <module>
database_manager: "BaseDatabaseManager" = init(settings=settings)
File "d:\vnstudio\lib\site-packages\vnpy\trader\database\initialize.py", line 12, in init
return init_sql(driver=driver, settings=settings)
File "d:\vnstudio\lib\site-packages\vnpy\trader\database\initialize.py", line 19, in init_sql
_database_manager = init(driver, settings)
File "d:\vnstudio\lib\site-packages\vnpy\trader\database\database_sql.py", line 35, in init
bar, tick = init_models(db, driver)
File "d:\vnstudio\lib\site-packages\vnpy\trader\database\database_sql.py", line 334, in init_models
db.connect()
File "d:\vnstudio\lib\site-packages\peewee.py", line 3038, in connect
self._initialize_connection(self._state.conn)
File "d:\vnstudio\lib\site-packages\peewee.py", line 2873, in
exit
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "d:\vnstudio\lib\site-packages\peewee.py", line 183, in reraise
raise value.with_traceback(tb)
File "d:\vnstudio\lib\site-packages\peewee.py", line 3035, in connect
self._state.set_connection(self._connect())
File "d:\vnstudio\lib\site-packages\peewee.py", line 3933, in _connect
conn = mysql.connect(db=self.database, **self.connect_params)
File "d:\vnstudio\lib\site-packages\pymysql\
init.py", line 94, in Connect
return Connection(*args, **kwargs)
File "d:\vnstudio\lib\site-packages\pymysql\connections.py", line 327, in
init__
self.connect()
File "d:\vnstudio\lib\site-packages\pymysql\connections.py", line 619, in connect
raise exc
peewee.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' ([WinError 10061] 由于目标计算机积极拒绝,无法连接。)")

Member
avatar
加入于:
帖子: 2643
声望: 157

这个是网络问题,是不是没有配置代理

Administrator
avatar
加入于:
帖子: 4873
声望: 283

taohjk wrote:

用Python的交易员 wrote:

这里应该是你的更新不完全出错了,卸载当前版本后转个新的VNStudio 2.1.7吧
重新安装了一遍,变这样了:
Traceback (most recent call last):
File "d:\vnstudio\lib\site-packages\pymysql\connections.py", line 571, in connect
**kwargs)
File "d:\vnstudio\lib\socket.py", line 727, in create_connection
raise err
File "d:\vnstudio\lib\socket.py", line 716, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "d:\vnstudio\lib\site-packages\peewee.py", line 3035, in connect
self._state.set_connection(self._connect())
File "d:\vnstudio\lib\site-packages\peewee.py", line 3933, in _connect
conn = mysql.connect(db=self.database, self.connect_params)
File "d:\vnstudio\lib\site-packages\pymysql__init__.py", line 94, in Connect
return Connection(*args,
kwargs)
File "d:\vnstudio\lib\site-packages\pymysql\connections.py", line 327, in init
self.connect()
File "d:\vnstudio\lib\site-packages\pymysql\connections.py", line 619, in connect
raise exc
pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' ([WinError 10061] 由于目标计算机积极拒绝,无法连接。)")

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "d:\vnstudio\lib\site-packages\vnstation\cli.py", line 90, in run_trader
module = importlib.import_module(d["module"])
File "d:\vnstudio\lib\importlib__init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "d:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\
init.py", line 9, in <module>
from .engine import CtaEngine
File "d:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 40, in <module>
from vnpy.trader.database import database_manager
File "d:\vnstudio\lib\site-packages\vnpy\trader\database\
init.py", line 12, in <module>
database_manager: "BaseDatabaseManager" = init(settings=settings)
File "d:\vnstudio\lib\site-packages\vnpy\trader\database\initialize.py", line 12, in init
return init_sql(driver=driver, settings=settings)
File "d:\vnstudio\lib\site-packages\vnpy\trader\database\initialize.py", line 19, in init_sql
_database_manager = init(driver, settings)
File "d:\vnstudio\lib\site-packages\vnpy\trader\database\database_sql.py", line 35, in init
bar, tick = init_models(db, driver)
File "d:\vnstudio\lib\site-packages\vnpy\trader\database\database_sql.py", line 334, in init_models
db.connect()
File "d:\vnstudio\lib\site-packages\peewee.py", line 3038, in connect
self._initialize_connection(self._state.conn)
File "d:\vnstudio\lib\site-packages\peewee.py", line 2873, in
exit
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "d:\vnstudio\lib\site-packages\peewee.py", line 183, in reraise
raise value.with_traceback(tb)
File "d:\vnstudio\lib\site-packages\peewee.py", line 3035, in connect
self._state.set_connection(self._connect())
File "d:\vnstudio\lib\site-packages\peewee.py", line 3933, in _connect
conn = mysql.connect(db=self.database, **self.connect_params)
File "d:\vnstudio\lib\site-packages\pymysql\
init.py", line 94, in Connect
return Connection(*args, **kwargs)
File "d:\vnstudio\lib\site-packages\pymysql\connections.py", line 327, in
init__
self.connect()
File "d:\vnstudio\lib\site-packages\pymysql\connections.py", line 619, in connect
raise exc
peewee.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' ([WinError 10061] 由于目标计算机积极拒绝,无法连接。)")

peewee是数据库对接的ORM模块,这个报错应该是你的MySQL服务器没启动,检查下吧

© 2015-2019 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号-3

沪公网安备 31011502017034号