FormBot : Encountered an exception while running action

i’m unable to run example/formbot in the github ie Form action ( rasa_core/examples/formbot at master · RasaHQ/rasa_core · GitHub )

there are no logs in the action server i’ve tried calling the interative shell using "rasa interactive -m latest/model/path --endpoints endpoints/path

We don’t maintain the code in the link you shared anymore. It seems like you are using Rasa 1.x. Please use the updated example here: rasa/examples/formbot at master · RasaHQ/rasa · GitHub.

Hi. I am also trying to get to know rasa using the formbot example. I think the “updated” code in the repository is not so updated any more, though I cannot be sure. I had several problems.

FYI I am using

  • windows 10 stable build
  • Python 3.7.6
  • Powershell 5.x
  • RASA 1.6.1

Also, I pulled the latest repo with the most updated code of the examples, using the following:

git clone https://github.com/RasaHQ/rasa.git

cd rasa/examples/formbot

Assuming this is the correct repo, I still ran into the following problems. To problem 1 I found a solution myself (below); problem 2 has me stumped.

Problem 1 was when I ran - as per the instructions - the command rasa train there was a long list of errors

0/11 [00:00<?, ?it/s, # trackers=1]c:\py-workspace.venv\lib\site-packages\rasa\core\domain.py:604: UserWarning: Failed to use action ‘utter_greet’ 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. f"Failed to use action ‘{latest_action}’ in history. " c:\py-workspace.venv\lib\site-packages\rasa\core\domain.py:604: UserWarning: 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. f"Failed to use action ‘{latest_action}’ in history. " c:\py-workspace.venv\lib\site-packages\rasa\core\domain.py:604: UserWarning: Failed to use action ‘utter_noworries’ 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. f"Failed to use action ‘{latest_action}’ in history. " Processed Story Blocks: 0%| | 0/11 [00:00<?, ?it/s, # trackers=1]c:\py-workspace.venv\lib\site-packages\rasa\core\domain.py:604: UserWarning: Failed to use action ‘utter_chitchat’ 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. f"Failed to use action ‘{latest_action}’ in history. " Processed Story Blocks: 0%| | 0/11 [00:00<?, ?it/s, # trackers=1c :\py-workspace.venv\lib\site-packages\rasa\core\domain.py:604: UserWarning: Failed to use action ‘utter_ask_continue’ 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.

After working on this it seems that the provided domain.yml file is wrong. I changed the “responses” section to be called “templates” and also added a section of “actions” with the following content:

actions:

  • utter_ask_cuisine

  • utter_ask_num_people

  • utter_ask_outdoor_seating

  • utter_ask_preferences

  • utter_ask_feedback

  • utter_submit

  • utter_slots_values

  • utter_noworries

  • utter_chitchat

  • utter_ask_continue

  • utter_wrong_cuisine

  • utter_wrong_num_people

  • utter_wrong_outdoor_seating

  • utter_default

  • utter_greet

  • utter_iamabot

After these changes the “rasa train” command worked.

However, even after this I am stuck, now with the custom actions. I try to run - as per the instructions - the command

Start-Job -ScriptBlock{rasa run actions}

but this fails with the errors

ERROR rasa_sdk.executor - Failed to register package ‘actions’. Traceback (most recent call last): File “c:\py-workspace.venv\lib\site-packages\rasa_sdk\executor.py”, line 206, in register_package self._import_submodules(package) File “c:\py-workspace.venv\lib\site-packages\rasa_sdk\executor.py”, line 191, in import_submodules package = importlib.import_module(package) File "C:\Users\Gilad\AppData\Local\Programs\Python\Python37\lib\importlib_init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File “”, line 1006, in _gcd_import File “”, line 983, in _find_and_load File “”, line 965, in _find_and_load_unlocked ModuleNotFoundError: No module named ‘actions’

After a pretty thorough search I believe I am doing everything as described in the doc but still stuff does not work. Please advise!

Thank you