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

AttributeError Traceback (most recent call last)

<ipython-input-11-cda7b0c3a5b8> in <module>
47 low_price=df.low[i],
48 close_price=df.close[i],
---> 49 gateway_name="DB",
50 )
51 bars.append(bar)

<string> in init(self, gateway_name, symbol, exchange, datetime, interval, volume, open_interest, open_price, high_price, low_price, close_price)

c:\vnstudio\lib\site-packages\vnpy\trader\object.py in post_init(self)
97 def post_init(self):
98 """"""
---> 99 self.vt_symbol = f"{self.symbol}.{self.exchange.value}"
100
101

AttributeError: 'str' object has no attribute 'value'

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

去掉.value

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