In Formbot example, changed name of function and rasa train continues to look for old function name

The code that was changed in multiple files used ‘utter_slots_values’ which I changed to ‘utter_slots_values_restaurant’ in the appropriate files. I grepped the directory to ensure that I changed all references for ‘utter_slots_values’. Now when I run rasa train I get the message WARNING rasa.core.domain - Failed to use action 'utter_slots_values' in history. Please make sure all actions are listed in the domains action list. If you recently removed an action, don't worry about this warning. It should stop appearing after a while. I’ve run rasa train about 10 times but I still get this message. Even though I ran the code successfully many times, once I renamed the function, rasa train has continued to look for the old function name. How can I get rasa train to work?

NOTE: some of the code that I pasted is converted to bullets since I chose the editor option to pre-format the code output below. The code I posted uses the proper formatting - no syntax errors. Code in domain.yml utter_slots_values_restaurant:

  • text: “I am going to run a restaurant search using the following parameters:\n
    \ - cuisine: {cuisine}\n - num_people: {num_people}\n - outdoor_seating: {outdoor_seating}\n
    \ - preferences: {preferences}\n - feedback: {feedback}”

Code in stories.md

happy path

  • greet
    • utter_greet
  • request_restaurant
    • restaurant_form
    • form{“name”: “restaurant_form”}
    • form{“name”: null}
    • utter_slots_values_restaurant

Here’s some of the output: 2019-11-01 16:54:28 WARNING rasa.core.domain - Failed to use action ‘utter_slots_values’ in history. Please make sure all actions are listed in the domains action list. If you recently removed an action, don’t worry about this warning. It should stop appearing after a while. 2019-11-01 16:54:28 WARNING rasa.core.domain - Failed to use action ‘utter_slots_values’ in history. Please make sure all actions are listed in the domains action list. If you recently removed an action, don’t worry about this warning. It should stop appearing after a while. Processed Story Blocks: 100%|█████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 222.95it/s, # trackers=9] Processed trackers: 100%|████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 1198.26it/s, # actions=55] Processed actions: 0it [00:00, ?it/s, # examples=8]Traceback (most recent call last): File “/usr/local/lib/python3.6/dist-packages/rasa/core/domain.py”, line 400, in index_for_action return self.action_names.index(action_name) ValueError: ‘utter_slots_values’ is not in list

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/rasa", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/rasa/__main__.py", line 76, in main
    cmdline_arguments.func(cmdline_arguments)
  File "/usr/local/lib/python3.6/dist-packages/rasa/cli/train.py", line 76, in train
    kwargs=extract_additional_arguments(args),
  File "/usr/local/lib/python3.6/dist-packages/rasa/train.py", line 45, in train
    kwargs=kwargs,
  File "uvloop/loop.pyx", line 1417, in uvloop.loop.Loop.run_until_complete
  File "/usr/local/lib/python3.6/dist-packages/rasa/train.py", line 96, in train_async
    kwargs,
  File "/usr/local/lib/python3.6/dist-packages/rasa/train.py", line 182, in _train_async_internal
    kwargs=kwargs,
  File "/usr/local/lib/python3.6/dist-packages/rasa/train.py", line 217, in _do_training
    kwargs=kwargs,
  File "/usr/local/lib/python3.6/dist-packages/rasa/train.py", line 346, in _train_core_with_validated_data
    kwargs=kwargs,
  File "/usr/local/lib/python3.6/dist-packages/rasa/core/train.py", line 67, in train
    agent.train(training_data, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/rasa/core/agent.py", line 687, in train
    self.policy_ensemble.train(training_trackers, self.domain, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/rasa/core/policies/ensemble.py", line 127, in train
    policy.train(training_trackers, domain, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/rasa/core/policies/memoization.py", line 162, in train
    self._add_states_to_lookup(trackers_as_states, trackers_as_actions, domain)
  File "/usr/local/lib/python3.6/dist-packages/rasa/core/policies/memoization.py", line 109, in _add_states_to_lookup
    feature_item = domain.index_for_action(action)
  File "/usr/local/lib/python3.6/dist-packages/rasa/core/domain.py", line 402, in index_for_action
    self._raise_action_not_found_exception(action_name)
  File "/usr/local/lib/python3.6/dist-packages/rasa/core/domain.py", line 411, in _raise_action_not_found_exception
    "".format(action_name, action_names)
NameError: Cannot access action 'utter_slots_values', as that name is not a registered action for this domain.

Did you also update the name of the template in the actions sections in the domain.yml?

I just found the issue - while I did update the name of the template, there were other references that I found. When I updated them to the new action name, rasa train worked perfectly. Thanks!