'Tracker' object has no attribute '_reset'


I want to reset an executed Form programmatically. According to


the following has to be implemented:

def apply_to(self, tracker):
    from rasa.core.actions.action import ACTION_LISTEN_NAME


If I do that, the AttributeError in the title is thrown. After investigating the method definitions - may it be the case, that the documentation is not up to date at this point?

I know that I could add the restart_functionality per intent in my stories but with growing size and amount of stories, that doesn’t seem to be the best way…

I there any other way to achieve this functionality? I have tried to return [Restarted()] but that didn’t help.

I found it out myself: I could use self.deactivate() to achieve the desired functionality.

Don’t know how to solve this issue yet but I figured out the reason. I guess you are importing Tracker from rasa_sdk too. Tracker from rasa_sdk package doesn’t have that method.

To achieve the same goal

from rasa_sdk.events import Restarted
class ActionCustom(Action):
    def run(self, dispatcher, tracker, domain):
        return [Restarted()]
1 Like

Any idea how to reset tracker without missing slots value??

Hi @sadque,

this could be kind of “un-rasa-esque”. May I ask why you want to do a full reset on the tracker? Maybere there is another way to achieve the desired functionality!?

Kind regards

if user asks question that not trained, bot is responding with action listen, and the story breaks, i wrote a custom action to solve that, the custom action will utter i am not trained and reset the tracker, so i can continue with new flow

Hi Did you find a way to reset tracker without refreshing slot values?

By returning [Restarted() + SlotSet objects] from custom action

**return [Restarted(), SlotSet1, SlotSet2 ...etc]**

Yes I did the same! thanks