Rasa 1.0.6 fallback action failing [SOLVED]

Hey all,

I’m working on a sample conversational chatbot with Rasa 1.0.6 (i.e., training and everything is done on the command line, with only a single custom action as a custom .py script). Everything is working as intended, except for the fallback action. It’s defined in the config file, which is as follows:


language: "en"


  • name: “SpacyNLP” # loads the spacy language model
  • name: “SpacyTokenizer” # splits the sentence into tokens
  • name: “CRFEntityExtractor” # uses the pretrained spacy NER model
  • name: “SpacyFeaturizer” # transform the sentence into a vector representation
  • name: “SklearnIntentClassifier” # uses the vector representation to classify using SVM
  • name: “EntitySynonymMapper” # trains the synonyms


  • name: “KerasPolicy” featurizer:
    • name: MaxHistoryTrackerFeaturizer max_history: 5 state_featurizer:
      • name: BinarySingleStateFeaturizer
  • name: “MemoizationPolicy” max_history: 5
  • name: “FallbackPolicy” nlu_threshold: 0.4 core_threshold: 0.3 fallback_action_name: “my_fallback_action”

And the domain:


  • greet
  • goodbye
  • mood_affirm
  • mood_deny
  • mood_great
  • mood_unhappy
  • inform

slots: group: type: text


  • group


  • utter_greet
  • utter_did_that_help
  • utter_happy
  • utter_goodbye
  • my_fallback_action
  • utter_ask_picture
  • action_retrieve_image
  • default

templates: utter_greet:

  • text: “Hey! How are you?”


  • text: “Did that help you?”


  • text: “I am not sure what you are aiming for.”


  • text: “Great carry on!”


  • text: “Bye”


  • text: “To cheer you up, I can show you a cute picture of a dog, cat or a bird. Which one do you choose?”


  • text: “Default test”

and sample stories:

strange user

  • mood_affirm
    • utter_happy
  • mood_affirm
    • default
    • my_fallback_action

say goodbye

  • goodbye
    • utter_goodbye


  • default
  • my_fallback_action

The error i’m getting is:

rasa.core.processor - Encountered an exception while running action ‘my_fallback_action’. Bot will continue, but the actions events are lost. Make sure to fix the exception in your custom code.

The ‘default’ action is also not being executed, so I suspect it’s got something to do with the policy itself.

I couldn’t find anything related on the forum, and I believe i’ve followed the instructions in the 1.0.6 documentation properly.

…and apologies if the body of this post isn’t formatted properly :confused:

Thank you!

I think you have to create a custom code for taring the core. You can try this below code.

def train_dialog(dialog_training_data_file, domain_file, path_to_model = 'models/dialogue'):
    fallback = FallbackPolicy(fallback_action_name="action_default_fallback",core_threshold=0.25,nlu_threshold=0.25)
    agent = Agent(domain_file,policies = [MemoizationPolicy(), KerasPolicy(),fallback])
    training_data = agent.load_data(dialog_training_data_file)

train_dialog('data/stories.md', 'domain.yml')

I’m trying to run with the full 1.0.6 capabilities, meaning that I train the models via the commandline, without custom training code. I think it should be possible, but perhaps I’m getting something wrong with the policies key in the config.yml file

Using rasa interactive -m models/model.tar.gz --debug i found that the model expects an endpoint for the fallback action, considering it a custom action. I’ll update this reply when I find out more.

EDIT/SOLUTION: The problem was that my fallback action was a simple utterance, but I did not name the action with an ‘utter_’ prefix, and Rasa was hence expecting a custom action.

Thank you for the input, good luck and have fun all!