Skip to content

Got FutureWarning about _plotting.py #705

Answered by kernc
kaya2k asked this question in Q&A
Discussion options

You must be logged in to vote

Is there a way to remove it without modifying .../backtesting/_plotting.py file?

Eventually, we'll have to remove it from the file to avoid using the deprecated code. But you can silence the warning by placing:

import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)

somewhere above your backtest.plot() call, or by setting the environment variable PYTHONWARNINGS:

PYTHONWARNINGS=ignore::FutureWarning

before starting the interpreter.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kaya2k
Comment options

Answer selected by kaya2k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants