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

ERROR -1 2104 Market data farm connection is OK:usfuture
ERROR -1 2104 Market data farm connection is OK:usopt
ERROR -1 2104 Market data farm connection is OK:usfarm
ERROR -1 2106 HMDS data farm connection is OK:hkhmds
ERROR -1 2106 HMDS data farm connection is OK:ushmds
ERROR -1 2158 Sec-def data farm connection is OK:secdefhk
Exception in thread Thread-9:
Traceback (most recent call last):
File "C:\vnstudio\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\vnstudio\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
self.decoder.interpret(fields)
File "C:\vnstudio\lib\site-packages\ibapi\decoder.py", line 1280, in interpret
handleInfo.processMeth(self, iter(fields))
File "C:\vnstudio\lib\site-packages\ibapi\decoder.py", line 258, in processPortfolioValueMsg
unrealizedPNL, realizedPNL, accountName)
File "C:\vnstudio\lib\site-packages\vnpy\gateway\ib\ib_gateway.py", line 489, in updatePortfolio
price = averageCost / ib_size
TypeError: unsupported operand type(s) for /: 'float' and 'str'

PS D:\git\vnpy> ${env:DEBUGPY_LAUNCHER_PORT}='50236'; & 'C:\vnstudio\python.exe' 'c:\Users\allen.vscode\extensions\ms-python.python-2020.3.69010\pythonFiles\lib\python\debugpy\wheels\debugpy\launcher' 'd:\git\vnpy\run.py'
ERROR -1 2104 Market data farm connection is OK:usfuture
ERROR -1 2104 Market data farm connection is OK:usopt
ERROR -1 2104 Market data farm connection is OK:usfarm
ERROR -1 2106 HMDS data farm connection is OK:hkhmds
ERROR -1 2106 HMDS data farm connection is OK:ushmds
ERROR -1 2158 Sec-def data farm connection is OK:secdefhk
Exception in thread Thread-9:
Traceback (most recent call last):
File "C:\vnstudio\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\vnstudio\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "C:\vnstudio\lib\site-packages\vnpy\gateway\ib\ib_gateway.py", line 804, in run
self.decoder.interpret(fields)
File "C:\vnstudio\lib\site-packages\ibapi\decoder.py", line 1280, in interpret
handleInfo.processMeth(self, iter(fields))
File "C:\vnstudio\lib\site-packages\ibapi\decoder.py", line 258, in processPortfolioValueMsg
unrealizedPNL, realizedPNL, accountName)
File "C:\vnstudio\lib\site-packages\vnpy\gateway\ib\ib_gateway.py", line 489, in updatePortfolio
price = averageCost / ib_size
TypeError: unsupported operand type(s) for /: 'float' and 'str'

点击连接IB就报这个错了
报错信息如上,持仓有CL的单月价差
订阅数据时,在名称一栏能显示出合约信息,但是订阅无效

Administrator
avatar
加入于:
帖子: 4749
声望: 278

请在Github开个issue吧,我们来修复下

Administrator
avatar
加入于:
帖子: 4749
声望: 278

请在Github开个issue吧,我们来修复下

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

沪公网安备 31011502017034号