Error : Tried to set non existent slot 'gender'. Make sure you added all your slots to your domain file


I been working on a chatbot, I was able to successfully create the model and tested it, everything was working till today evening. After that I have added couple of intents (didn’t used any slots, it’s just a small talk) in the nlu.yml file, and made corresponding changes in the domain.yml and stories.yml files, then I tried to retrain the model again, then this situation started. I’m sure there no is no indentation issue. rasa version 2.2.6. Can anyone please help me on this issue. thanks in advance.

Hi @Srikanth

From the outset, looks like you are using an entity named gender and a corresponding slot is not defined under slots section in your domain file.

Can you share your domain, nlu file to assist further.



  • gender
  • bodytype
  • temperature

slots: gender: type: text

bodytype: type: text

temperature: type: text


  • intent: user_gender examples: |

    • [male] {“entity”:“gender”,“value”:“male”}
    • my gender is [male] {“entity”:“gender”,“value”:“male”}
    • i’m [male] {“entity”:“gender”,“value”:“male”}
    • gender is [male] {“entity”:“gender”,“value”:“male”}
    • [female] {“entity”:“gender”,“value”:“female”}
    • my gender is [female] {“entity”:“gender”,“value”:“female”}
    • gender is [female] {“entity”:“gender”,“value”:“female”}
    • i’m [female] {“entity”:“gender”,“value”:“female”}
  • intent: user_bodytype examples: |

    • [skinny] {“entity”:“bodytype”,“value”:“skinny”}
    • my bodytype is [skinny] {“entity”:“bodytype”,“value”:“skinny”}
    • i’m [skinny] {“entity”:“bodytype”,“value”:“skinny”}
    • [slim] {“entity”:“bodytype”,“value”:“slim”}
    • my bodytype is [slim] {“entity”:“bodytype”,“value”:“slim”}
    • i’m [slim] {“entity”:“bodytype”,“value”:“slim”}
    • [medium] {“entity”:“bodytype”,“value”:“medium”}
    • my bodytype is [medium] {“entity”:“bodytype”,“value”:“medium”}
    • i’m [medium] {“entity”:“bodytype”,“value”:“medium”}

I have another slot for temperature, but i’m not getting any error related to that. The issue is with only gender and bodytype. These slots all were working fine till couple of hours back, the issue started just after I added some small talk content.

Hi @Srikanth

Please share the files rather than as text. Also share the error log which you get when you initiate training.

domain.yml (10.3 KB) nlu.yml (33.2 KB)

Please find the attached files

Hi @Srikanth

You files looks good. I have just formatted domain.yml alone. Can you try with this.

domain.yml (9.8 KB)

Thank you for trying to help me Raja Duraisingam, I tried the domain.yml file you gave me, but it’s not working. I’m getting the same error. This happened with other people as well, though there were no errors in the code, they were getting these kind of errors.