Problem extracting user input into a slot

Hello i am trying to create a form in order to save user’s input. But i have a problem : when the form starts and asks for the user’s first input, an error message occurs:

rasa.core.actions.action - Failed to extract slot {name} with action {form name}

What i want the bot to execute is very simple: ask for user name and few others questions.

Here is my actions.py file:

class AddUserForm(FormAction):

    def name(self) -> Text:
        """Unique identifier of the form"""
        return "add_user_form"

    @staticmethod
    def required_slots(tracker: Tracker) -> List[Text]:
        """A list of required slots that the form has to fill"""

        return ["Name", "Description", "Groups_List", "Email_address"]


def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
    """A dictionary to map required slots to
        - an extracted entity
        - intent: value pairs
        - a whole message
        or a list of them, where a first match will be picked"""

    return {
        "Name": self.from_entity(entity="Name", intent="inform_name"),
        "Description": [
            self.from_entity(
                entity="Description", intent=["inform"]
            )
        ],
        "Groups_List": [
            self.from_entity(entity="Groups_List"),
            
        ],
        "Email_address": [
            self.from_intent(intent="inform"),
        ]
    }


    def submit(
        self,
        dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any],
    ) -> List[Dict]:
        """Define what the form has to do
            after all required slots are filled"""

        # utter submit template
        dispatcher.utter_template("utter_submit", tracker)
        return []

Here is my domain file:

intents:
  - greet
  - ADD_USER
  - affirm
  - deny
  - thank_you
  - inform_name

entities:
  - Name
  - Description
  - Groups_List
  - Email_address

slots:
  Name:
    type: unfeaturized
    auto_fill: false
  Description:
    type: unfeaturized
    auto_fill: false
  Groups_List:
    type: unfeaturized
    auto_fill: false
  Email_address:
    type: unfeaturized
    auto_fill: false
  requested_slot:
    type: unfeaturized

templates:
  utter_greet:
    - text: 'Hello Frederic! How can I help you?'

  utter_confirm_add_user:
    - text: ' If i understand correctly, you want to add anew user to the Planisware application ?'

  utter_launching_request:
    - text: 'Your request has been sent for validation. '

  utter_bye:
    - text: 'Thank you for using our chatbot, have a nice day Frederic'

  utter_default:
    - text: "Sorry, I didn't get that, can you rephrase it?"

  utter_slots_values:
    - text: "I am going to add a user with the following parameters:\n
             - Name: {Name}\n
             - Description: {Description}\n
             - Groups_List: {Groups_List}\n
             - Email_address: {Email_address}"

  utter_ask_Name: 
    - text: "Can you please give me his name ?"

  utter_ask_Description:
    - text: "Can you please give me his Description ?"

  utter_ask_Groups_List: 
    - text: "Can you please give me his group list ?"
    
  utter_ask_Email_address: 
    - text: "Can you please give me his email address ?"

actions:
  - utter_greet
  - utter_confirm_add_user
  - utter_launching_request
  - utter_bye
  - utter_default
  - utter_slots_values


forms:
  - add_user_form

And this is my Data: ## intent:greet

- hey
- hello
- hi
- good morning
- good evening
- hey there

## intent:ADD_USER

- Add User 
- Add account
- New User
- New account
- New 
- Add
- Add a new user to x
- Add a new account to x
- Add a new user to x
- Add a new account to x
- I would like to add somebody to the x application 
- I would like to add somebody to the x application 

[//] ## intent:inform_name ## intent:inform_descritpion ## intent:inform_group_list ## intent:inform_email

## inform
His name is [Elie](Name)
The name is [Elie](Name)
The user name is [Elie](Name)
His Description is is [A4675](Description)
The Description is [A4675](Description)
The user Description is [A4675](Description)
His email adress is [Elie](Groups_List)
The email adress is [Elie](Groups_List)
The user email is [Elie](Groups_List)
His email adress is is [elie@gmail.com](Email_address)
The email adress is [elie@gmail.com](Email_address)
The user email adress is [elie@gmail.com](Email_address)

## inform_name
His name is Elie
The name is Elie
The user name is Elie
Elie

## intent:affirm

- yes
- indeed
- of course
- that sounds good
- correct
- sure 
- sure thing

## intent:deny

- no
- never
- I don't think so
- don't like that
- no way
- not really

## thank_you
- um thank you good bye
- okay cool uh good bye thank you
- okay thank you good bye
- you rock
- and thats all thank you and good bye
- thank you and good bye
- sorry about my mistakes thank you good bye
- noise thank you good bye
- thank you goodbye noise
- okay thank you goodbye
- uh thank you good bye
- thank you goodbye
- thank you goodbye noise thank you goodbye
- breath thank you goodbye
- thank you
- okay thank you
- thanks goodbye
- ah thank you goodbye
- thank you noise
- thank you good bye
- breath thank you very much goodbye
- thanks
- noise thank you goodbye
- unintelligible thank you goodbye
- uh okay thank you good bye
- thank you bye
- um okay thank you good bye

And i will join the error:

In the slot mapping, you only set the name with the intent “inform_name” but the majority of examples in your data file are with “inform”, so change this

"Name": self.from_entity(entity="Name", intent="inform_name")

to:

"Name": self.from_entity(entity="Name", intent=["inform", "inform_name"])

Thank you for your answer.

I did, and i tried adding some more examples, still not working.

just do this:

return { “Name”: [self.from_text()], “Description”: [self.from_text()], “Groups_List”: [self.from_text()], “Email_address”: [self.from_text()] }

I used this in the slot_mappings, i still got the same error : Unable to extract slot with action.

Maybe it will help if you see a full example. Otherwise you forgot to put your entity and slot in your domain.yml

class Login(FormAction): “”“Example of a custom form action”""

def name(self):
    # type: () -> Text
    """Unique identifier of the form"""

    return "login_form"

@staticmethod
def required_slots(tracker: Tracker) -> List[Text]:
    """A list of required slots that the form has to fill"""

    return ["base_url", "username", "password"]

def slot_mappings(self):
    # type: () -> Dict[Text: Union[Dict, List[Dict]]]
    """A dictionary to map required slots to
        - an extracted entity
        - intent: value pairs
        - a whole message
        or a list of them, where a first match will be picked"""

    return {"base_url": [self.from_text()],
            "username": [self.from_text()],
            "password": [self.from_text()]}

def submit(self,
           dispatcher: CollectingDispatcher,
           tracker: Tracker,
           domain: Dict[Text, Any]) -> List[Dict]:
    """Define what the form has to do
    after all required slots are filled"""

    try:
        check_login(tracker)
        dispatcher.utter_message(f'Welcome {tracker.get_slot("username")}')
        dispatcher.utter_message(f'How can I help you?')
        return []
    except UnauthorizedException:
        dispatcher.utter_message("invalid user credentials")
        ask_login(dispatcher)
        return [SlotSet("base_url", None), SlotSet("username", None), SlotSet("password", None)]
    except MissingLoginInformationException:
        ask_login(dispatcher)
        return []

Any solution to get user input set to slot value, self.from_text() not worked, tried with self.from_entity() that’s worked for mapping but when tries with entirely different name that not used to train system fails

Same Problem with me as well… Sounds Silly But Still Cannot Fill a Random name in to Slot.