Rachnog / Deep-Trading

Algorithmic trading with deep learning experiments
1.43k stars 695 forks source link

Unable to execute Code due to => TypeError: 'generator' object is not subscriptable #12

Closed aloksaw closed 6 years ago

aloksaw commented 6 years ago

Traceback (most recent call last): File "C:\Users\alok.saw\Downloads\Deep-Trading-master\Deep-Trading-master\hyperparameters\hyper.py", line 164, in best = fmin(experiment, space, algo=tpe.suggest, max_evals=50, trials=trials) File "C:\Users\alok.saw\AppData\Local\Programs\Python\Python35\lib\site-packages\hyperopt\fmin.py", line 307, in fmin return_argmin=return_argmin, File "C:\Users\alok.saw\AppData\Local\Programs\Python\Python35\lib\site-packages\hyperopt\base.py", line 635, in fmin return_argmin=return_argmin) File "C:\Users\alok.saw\AppData\Local\Programs\Python\Python35\lib\site-packages\hyperopt\fmin.py", line 314, in fmin pass_expr_memo_ctrl=pass_expr_memo_ctrl) File "C:\Users\alok.saw\AppData\Local\Programs\Python\Python35\lib\site-packages\hyperopt\base.py", line 786, in init pyll.toposort(self.expr) File "C:\Users\alok.saw\AppData\Local\Programs\Python\Python35\lib\site-packages\hyperopt\pyll\base.py", line 715, in toposort assert order[-1] == expr TypeError: 'generator' object is not subscriptable

aloksaw commented 6 years ago

Solved by downgrading networkx 2.0 to 1.11

$ pip install networkx==1.11