cerebro.plot() report errors
-
Traceback (most recent call last):
File "C:/Users/阿斯顿/PycharmProjects/Career/pythonProject5/main.py", line 147, in <module>
cerebro.plot()
File "E:\apy\lib\site-packages\backtrader\cerebro.py", line 974, in plot
from . import plot
File "E:\apy\lib\site-packages\backtrader\plot_init_.py", line 42, in <module>
from .plot import Plot, Plot_OldSync
File "E:\apy\lib\site-packages\backtrader\plot\plot.py", line 44, in <module>
from . import locator as loc
File "E:\apy\lib\site-packages\backtrader\plot\locator.py", line 35, in <module>
from matplotlib.dates import (HOURS_PER_DAY, MIN_PER_HOUR, SEC_PER_MIN,
ImportError: cannot import name 'warnings' from 'matplotlib.dates' (E:\apy\lib\site-packages\matplotlib\dates.py) -
@T-yellow
It would help to see you code. -
Thank you. I got it
-
@T-yellow said in cerebro.plot() report errors:
cannot import name 'warnings' from 'matplotlib.dates'
For the benefits of community - this issue was discussed multiple times in this forum - just search for
cannot import name 'warnings' from 'matplotlib.dates'
and you'll get:https://community.backtrader.com/post/12963
https://community.backtrader.com/post/13499
https://community.backtrader.com/post/13339 -
OK Thank you