cerebro.plot() error!!!
-
I want to use Backtrader on Python IDE ,not with anaconda, not in jupyter.
every is ok, only cerebro.plot() get error.
It raise : AttributeError: 'NoneType' object has no attribute 'session'.
how to solve it ? -
The first thing for anyone to be able to offer any diagnostic is that people know what you are doing and what the error looks like. And the best approach to achieve that is to have a small code snippet, small data sample to reproduce the error.
@MuSaCN said in cerebro.plot() error!!!:
every is ok
That's your assumption. It may simply not be the case.
-
I found out where the error is:
matplotlib's backend must set to "TkAgg".cerebro.plot(iplot= True) will set backend to "nbAgg".
-
Glad you solved the problem, but as it is often the case, any kind of help or diagnostic is impossible if you say
@MuSaCN said in cerebro.plot() error!!!:
I want to use Backtrader on Python IDE ,not with anaconda, not in jupyter.
every is ok, only cerebro.plot() get error.but you are really doing something different.
@MuSaCN said in cerebro.plot() error!!!:
cerebro.plot(iplot= True) will set backend to "nbAgg".