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

C:\Users\Administrator\Downloads\vnpy208\examples\vn_trader> python run.py
Traceback (most recent call last):
File "run.py", line 36, in <module>
from vnpy.app.cta_strategy import CtaStrategyApp
File "C:\Miniconda3\lib\site-packages\vnpy\app\cta_strategy__init.py", line 9, in <module>
from .engine import CtaEngine
File "C:\Miniconda3\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 39, in <module>
from vnpy.trader.database import database_manager
File "C:\Miniconda3\lib\site-packages\vnpy\trader\database\
init__.py", line 12, in <module>
database_manager: "BaseDatabaseManager" = init(settings=settings)
File "C:\Miniconda3\lib\site-packages\vnpy\trader\database\initialize.py", line 8, in init
return init_nosql(driver=driver, settings=settings)
File "C:\Miniconda3\lib\site-packages\vnpy\trader\database\initialize.py", line 23, in init_nosql
_database_manager = init(driver, settings=settings)
File "C:\Miniconda3\lib\site-packages\vnpy\trader\database\database_mongo.py", line 31, in init
authentication_source=authentication_source,
File "C:\Miniconda3\lib\site-packages\mongoengine\connection.py", line 376, in connect
register_connection(alias, db, kwargs)
File "C:\Miniconda3\lib\site-packages\mongoengine\connection.py", line 193, in register_connection
kwargs)
File "C:\Miniconda3\lib\site-packages\mongoengine\connection.py", line 86, in _get_connection_settings
_check_db_name(conn_settings['name'])
File "C:\Miniconda3\lib\site-packages\mongoengine\connection.py", line 44, in _check_db_name
_check_name(name)
File "C:\Miniconda3\lib\site-packages\pymongo\database.py", line 52, in _check_name
"character %r" % invalid_char)
pymongo.errors.InvalidName: database names cannot contain the character '.'
PS C:\Users\Administrator\Downloads\vnpy208\examples\vn_trader>

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

Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\vnpy\trader\ui\widget.py", line 558, in connect
field_value = field_type(widget.text())
ValueError: invalid literal for int() with base 10: ''
借楼主宝地,问一下这个错误什么情况,怎么处理?

Member
avatar
加入于:
帖子: 94
声望: 1

str_pythin wrote:

C:\Users\Administrator\Downloads\vnpy208\examples\vn_trader> python run.py
Traceback (most recent call last):
File "run.py", line 36, in <module>
from vnpy.app.cta_strategy import CtaStrategyApp
File "C:\Miniconda3\lib\site-packages\vnpy\app\cta_strategy__init.py", line 9, in <module>
from .engine import CtaEngine
File "C:\Miniconda3\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 39, in <module>
from vnpy.trader.database import database_manager
File "C:\Miniconda3\lib\site-packages\vnpy\trader\database\
init__.py", line 12, in <module>
database_manager: "BaseDatabaseManager" = init(settings=settings)
File "C:\Miniconda3\lib\site-packages\vnpy\trader\database\initialize.py", line 8, in init
return init_nosql(driver=driver, settings=settings)
File "C:\Miniconda3\lib\site-packages\vnpy\trader\database\initialize.py", line 23, in init_nosql
_database_manager = init(driver, settings=settings)
File "C:\Miniconda3\lib\site-packages\vnpy\trader\database\database_mongo.py", line 31, in init
authentication_source=authentication_source,
File "C:\Miniconda3\lib\site-packages\mongoengine\connection.py", line 376, in connect
register_connection(alias, db, kwargs)
File "C:\Miniconda3\lib\site-packages\mongoengine\connection.py", line 193, in register_connection
kwargs)
File "C:\Miniconda3\lib\site-packages\mongoengine\connection.py", line 86, in _get_connection_settings
_check_db_name(conn_settings['name'])
File "C:\Miniconda3\lib\site-packages\mongoengine\connection.py", line 44, in _check_db_name
_check_name(name)
File "C:\Miniconda3\lib\site-packages\pymongo\database.py", line 52, in _check_name
"character %r" % invalid_char)
pymongo.errors.InvalidName: database names cannot contain the character '.'
PS C:\Users\Administrator\Downloads\vnpy208\examples\vn_trader>

删除.vntrader文件夹解决

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