Ask Your Question

Revision history [back]

The error message "AttributeError: 'RRuleLocator' object lacks 'setviewinterval' attribute" in Backtrader typically means that there is an issue with the RRuleLocator object, particularly with its setviewinterval attribute. The setviewinterval attribute is responsible for setting the start and end dates for the plot view interval. The error suggests that the attribute is absent or missing from the RRuleLocator object, which can indicate a problem with the code implementation or an issue with the version of Backtrader being used. It is important to review the code and ensure that the necessary attributes and libraries are included and up-to-date.