Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracker.get_last_event_for ignores restart events #280

Closed
nbeuchat opened this issue Sep 24, 2020 · 4 comments · Fixed by #283
Closed

tracker.get_last_event_for ignores restart events #280

nbeuchat opened this issue Sep 24, 2020 · 4 comments · Fixed by #283
Labels
area:rasa-sdk 🧑‍💻 Everything that touches our python Rasa SDK type:bug 🐛 Something isn't working

Comments

@nbeuchat
Copy link
Contributor

nbeuchat commented Sep 24, 2020

Rasa version: 1.9.5

Rasa SDK version: 1.9.0 (same issue with master)

Python version: 3.7

Operating system (windows, osx, ...): Unix

Issue:
When calling tracker.get_last_event_for("user", skip=n), events that are before a restart event are included.

This seems to be due to an issue in the applied_events.

if event.get("name") == "restart":
    applied_events = []
elif event.get("name") == "undo":
    undo_till_previous("action", applied_events)
elif event.get("name") == "rewind":
    ...

From the code above, the event name is None. I believe it should get the event as event.get("event") instead.

Command or request that led to error:

# run an action with a `Restarted()` event
# in another action, run:
tracker.get_last_event_for("user", skip=n)
@nbeuchat nbeuchat added area:rasa-sdk 🧑‍💻 Everything that touches our python Rasa SDK type:bug 🐛 Something isn't working labels Sep 24, 2020
@sara-tagger
Copy link

sara-tagger commented Sep 25, 2020

Thanks for raising this issue, @tabergma will get back to you about it soon✨

Please also check out the docs and the forum in case your issue was raised there too 🤗

@tabergma
Copy link
Contributor

@nbeuchat Thanks for raising this issue. You seem to be right. Would you be up for fixing this issue and submitting a PR?

@nbeuchat
Copy link
Contributor Author

@tabergma sure :-) Should this be based on master?

@tabergma
Copy link
Contributor

Yes, master would be great. Thanks 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-sdk 🧑‍💻 Everything that touches our python Rasa SDK type:bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants