楼主,我在模拟运行时报如下错误,是什么原因?帮忙分析下
2015-01-19 14:52:00 - ERROR - Traceback (most recent call last):
File "kuanke/user_space.py", line 139, in exec_msg
return getattr(self, func)(*msg['args'], **msg['kwargs'])
File "kuanke/user_space.py", line 421, in call_user_funcs
func(self.user_context)
File "user_code.py", line 131, in do_handle_data
adjust_position(context, buy_stocks)
File "user_code.py", line 236, in adjust_position
g.trade_stat.watch(context, stock)
File "tradestat.py", line 41, in watch
amount = sale_position.total_amount
AttributeError: 'str' object has no attribute 'total_amount'