[2018-04-19 01:04:56.697574] INFO: BTgymAPIshell_0: ...done.
Traceback (most recent call last):
[2018-04-19 01:04:56.698795] INFO: BTgymAPIshell_0: Base Cerebro class used. Base Strategy class used.
File "/btgym/tests/quickstart.py", line 8, in
verbose=1,
File "/btgym/btgym/envs/backtrader.py", line 353, in init
if 'raw_state' in self.params['strategy']['state_shape'].keys():
AttributeError: 'tuple' object has no attribute 'keys'
When using the parameter state_shape to create BTgymEnv, it will throw AttributeError: 'tuple' object has no attribute 'keys'
Running environment:
python 3, macosx
from btgym import BTgymEnv
MyEnvironment = BTgymEnv(filename='../examples/data/DAT_ASCII_EURUSD_M1_2016.csv', episode_duration={'days': 2, 'hours': 23, 'minutes': 55}, drawdown_call=50, state_shape=(4,20), port=5555, verbose=1, )
Files or part of package has been run:
backtrader.py
Actual behaviour:
[2018-04-19 01:04:56.697574] INFO: BTgymAPIshell_0: ...done. Traceback (most recent call last): [2018-04-19 01:04:56.698795] INFO: BTgymAPIshell_0: Base Cerebro class used. Base Strategy class used. File "/btgym/tests/quickstart.py", line 8, in
verbose=1,
File "/btgym/btgym/envs/backtrader.py", line 353, in init
if 'raw_state' in self.params['strategy']['state_shape'].keys():
AttributeError: 'tuple' object has no attribute 'keys'