Getting ActionNotFoundException: Cannot access action 'num_devices_form' even though form is defined on domain

Hi I’m using rasa 2.8.1 and I have a chatbot that is using a form to collect a number from the user. However, when training, I get the following error: ActionNotFoundException: Cannot access action ‘num_devices_form’, as that name is not a registered action for this domain. Available actions are:…

Here’s how my domain file looks:

version: "2.0"

intents:
  - "greet"
  - "inform"
  - "price"

entities:
  - "number"

actions:
  - "action_price_check"
  
responses:
  utter_greet:
  - text: "Hi"

  utter_ask_num_devices:
  - text: "How many devices do you need?"

forms:
  num_devices_form:
    num_devices:
      - type: from_entity
        entity: number
  
slots:
  num_devices:
    type: text

I also have the following rules to activate and submit the form:


- rule: Activate number of devices form
  steps:
  - intent: price
  - action: num_devices_form
  - active_loop: num_devices_form

- rule: Submit number of devices form
  condition:
  - active_loop: num_devices_form
  steps:
  - action: num_devices_form
  - active_loop: null
  - slot_was_set:
    - requested_slot: null
  - action: action_price_check

Hello, try to add num_devices to your entities.

This is not the issue, this is the syntax I’ve used for all my previous bots and they’ve trained fined. During training, I don’t need to start the action server so that’s also not the issue.

I removed the form rules and only left the greet one (I didn’t show the greet rule on the first post) and now it’s giving me an error saying the action ‘utter_greet’ is not defined in the domain

@SangeMax97 I have withdrawn my post/suggestion :slight_smile:

This is not a correct syntax for Rasa 2.x (Please see the docs). Here’s the correct one:

forms:
  num_devices_form:
    required_slots:
        num_devices:
          - type: from_entity
            entity: number

The syntax i used still works with rasa 2.8, its only deprecated in 3.x so that’s not the cause of the issue. When I remove the form from the domain and the form rules, it complains about a diifferent action not being found

2.x or not, the syntax is not correct, as you did not add required_slots.

Please check the docs for 2.x I mentioned above.

Added the required_slot key to the form and I’m still getting the same error. When I remove the form entirely, I get ActionNotFoundException: Cannot access action ‘utter_greet'. It seems like it’s not registering any action from my domain file.

Your bot seems already developed. So did it work before and it suddenly stopped working?

The problem is fixed. The bot has a lot of other functionalities which I omitted from my previous post to save time debugging since the issue was specific to the form not being defined in the domain. However, through looking at my entire bot I found duplicate actions being listed under the actions key on my domain file and that’s what was causing the problem.

Thank you so much to everyone that replied with posible fixes, your help is appreciated.

1 Like