Kismuz / btgym

Scalable, event-driven, deep-learning-friendly backtesting library
https://kismuz.github.io/btgym/
GNU Lesser General Public License v3.0
979 stars 259 forks source link

ValueError: Axis limits cannot be NaN or Inf #141

Closed lorrp1 closed 3 years ago

lorrp1 commented 3 years ago

Steps to reproduce:

colab, installated following the documentation with !pip install tensorflow==1.5.0 to avoid other errors

Error: Process DrawCerebro-37:2:1: Traceback (most recent call last): File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/content/btgym/btgym/rendering/plotter.py", line 76, in run figfilename='_tmp_btgym_render.png', File "/usr/local/lib/python3.6/dist-packages/backtrader/cerebro.py", line 991, in plot start=start, end=end, use=use) File "/usr/local/lib/python3.6/dist-packages/backtrader/plot/plot.py", line 220, in plot self.plotdata(data, self.dplotsover[data]) File "/usr/local/lib/python3.6/dist-packages/backtrader/plot/plot.py", line 672, in plotdata data, opens, highs, lows, closes, volumes, vollabel) File "/usr/local/lib/python3.6/dist-packages/backtrader/plot/plot.py", line 614, in plotvolume ax.set_ylim(0, volylim, auto=True) File "/usr/local/lib/python3.6/dist-packages/matplotlib/axes/_base.py", line 3578, in set_ylim rx2 = alpha * (Xmax - x0) + Xmin File "/usr/local/lib/python3.6/dist-packages/matplotlib/axes/_base.py", line 3101, in _validate_converted_limits (bottom, top). ValueError: Axis limits cannot be NaN or Inf

i tried adding a volume = false like written here: #19 but its not working.

lorrp1 commented 3 years ago

i have tried reinstalling it again and everything is working now. im not sure what was the problem.