question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handle `ValueError` in `IntentMaxHistoryTrackerFeaturizer`

See original GitHub issue

Sentry Issue: RASA-OPEN-SOURCE-DPA

ValueError: ‘brewery_search_city’ is not in list (18 additional frame(s) were not displayed) … File “rasa\core\policies\policy.py”, line 197, in _featurize_for_training == SupportedData.ML_DATA, File “rasa\core\featurizers\tracker_featurizers.py”, line 391, in featurize_trackers label_ids = self._convert_labels_to_ids(trackers_as_labels, domain) File “rasa\core\featurizers\tracker_featurizers.py”, line 961, in _convert_labels_to_ids for tracker_intents in trackers_as_intents File “rasa\core\featurizers\tracker_featurizers.py”, line 961, in for tracker_intents in trackers_as_intents File “rasa\core\featurizers\tracker_featurizers.py”, line 960, in <span class="error">[domain.intents.index(intent) for intent in tracker_intents]</span>

Definition of Done

  • add check if intent is in domain.intents; otherwise emit UserWarning and raise RasaException or see below suggestion from @dakshvar22

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dakshvar22commented, Mar 17, 2022

Exalate commented:

dakshvar22 commented:

@ancalita The error suggests that a training story consists of an intent which is not declared in the domain file. The proper fix for this will be to implement a check before policies are trained to verify that all intents from training stories are declared in the domain.

0reactions
jupyterjazzcommented, Mar 17, 2022

Exalate commented:

jupyterjazz commented:

Received another alert this week: RASA-OPEN-SOURCE-DPH Wondering if we should move this to inbox since it occurs so frequently

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python ValueError Exception Handling Examples - DigitalOcean
Handling ValueError Exception. Here is a simple example to handle ValueError exception using try-except block. import math x = int(input('Please ...
Read more >
How to Fix ValueError Exceptions in Python - Rollbar
The Python ValueError occurs when a function receives an argument of the correct data type but an inappropriate value. Learn how to fix...
Read more >
What is the best way to handle ValueError in python?
I wanna to check type error in my python app. Is it a correct way to catch ValueError in the following way? async...
Read more >
8. Errors and Exceptions — Python 3.11.1 documentation
Most exceptions are not handled by programs, however, and result in error messages ... err) except ValueError: print("Could not convert data to an...
Read more >
Python Exception Handling - ValueError - Airbrake Blog
In this blog, we'll go into the Python ValueError, how it differs from a Type Error, and how to fix it if you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found