vn.py量化社区
By Traders, For Traders.
Member
avatar
加入于:
帖子: 2
声望: 0

Traceback (most recent call last):
File "D:\vnstudio\lib\site-packages\vnstation\cli.py", line 78, 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 39, 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 8, in init
return init_nosql(driver=driver, settings=settings)
File "D:\vnstudio\lib\site-packages\vnpy\trader\database\initialize.py", line 23, in init_nosql
_database_manager = init(driver, settings=settings)
File "D:\vnstudio\lib\site-packages\vnpy\trader\database\database_mongo.py", line 31, in init
authentication_source=authentication_source,
File "D:\vnstudio\lib\site-packages\mongoengine\connection.py", line 376, in connect
register_connection(alias, db, kwargs)
File "D:\vnstudio\lib\site-packages\mongoengine\connection.py", line 193, in register_connection
kwargs)
File "D:\vnstudio\lib\site-packages\mongoengine\connection.py", line 86, in _get_connection_settings
_check_db_name(conn_settings['name'])
File "D:\vnstudio\lib\site-packages\mongoengine\connection.py", line 44, in _check_db_name
_check_name(name)
File "D:\vnstudio\lib\site-packages\pymongo\database.py", line 52, in _check_name
"character %r" % invalid_char)
pymongo.errors.InvalidName: database names cannot contain the character '.'

小白刚开始学习,有大神帮忙看下如何配置!万分感谢!

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

或者,vnpy的配置如何初始化

Administrator
avatar
加入于:
帖子: 1868
声望: 85

找到配置目录:C:\users\adminstrator.vntrader,删掉其中的vt_setting.json,然后重启就行

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