# Unable to parse intent throws error: rasa\\lib\\site-packages\\rasa\\core\\processor.py:366: UserWarning: Interpreter parsed an intent 'hey' that is not defined in the domain. f"Interpreter parsed an intent '{intent}' "

**URL:** <https://forum.rasa.com/t/unable-to-parse-intent-throws-error-rasa-lib-site-packages-rasa-core-processor-py-userwarning-interpreter-parsed-an-intent-hey-that-is-not-defined-in-the-domain-f-interpreter-parsed-an-intent-intent/23477>\
**Category:** Rasa Open Source\
**Created:** [January 14, 2020, 7:35am UTC](https://forum.rasa.com/t/unable-to-parse-intent-throws-error-rasa-lib-site-packages-rasa-core-processor-py-userwarning-interpreter-parsed-an-intent-hey-that-is-not-defined-in-the-domain-f-interpreter-parsed-an-intent-intent/23477 "2020-01-14T07:35:37Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtrworld](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mtrworld/32/6630_2.png) [@mtrworld](https://forum.rasa.com/u/mtrworld)\
**Post date:** [January 14, 2020, 7:35am UTC](https://forum.rasa.com/t/unable-to-parse-intent-throws-error-rasa-lib-site-packages-rasa-core-processor-py-userwarning-interpreter-parsed-an-intent-hey-that-is-not-defined-in-the-domain-f-interpreter-parsed-an-intent-intent/23477/1 "2020-01-14T07:35:37Z")

</div>

I am writing a chatbot code and I have defined few intents in the domain.yml file as follows: intents:

- restaurant\_search
- send\_mail
- affirm
- greet
- goodbye
- stop
- dont\_send\_email

These intents are in turn defined in nlu.md as follows:

## intent:greet

- hey
- howdy
- hey there
- hello
- hi
- good morning
- good evening
- dear sir

Now when I run the rasa shell after giving input as “hey” it throws error: rasa\lib\site-packages\rasa\core\processor.py:366: UserWarning: Interpreter parsed an intent ‘hey’ that is not defined in the domain. f"Interpreter parsed an intent ‘{intent}’ "

I am not able to debug the issue since the intent hey is clearly mentioned in the nlu.md and the domain file. Still the interpreter in unable to parse it. Any clues?

---

<div class="post-metadata">

**Author:** ![Chatbot\_Ra](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chatbot_ra/32/2238_2.png) [@Chatbot\_Ra](https://forum.rasa.com/u/Chatbot_Ra)\
**Post date:** [January 14, 2020, 8:33am UTC](https://forum.rasa.com/t/unable-to-parse-intent-throws-error-rasa-lib-site-packages-rasa-core-processor-py-userwarning-interpreter-parsed-an-intent-hey-that-is-not-defined-in-the-domain-f-interpreter-parsed-an-intent-intent/23477/2 "2020-01-14T08:33:36Z")

</div>

I have the same problem. I have mentioned it if previous posts:

[forum post 1](http://forum.rasa.com/t/how-to-set-a-slot-value-in-custom-form/23336)

[forum post 2](http://forum.rasa.com/t/intent-not-defined-in-the-domain/23270)

Does your bot behaves the way it should? This is true for my case. Therefore I think it might be a bug.

---

<div class="post-metadata">

**Author:** ![Mappi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mappi/32/6579_2.png) [@Mappi](https://forum.rasa.com/u/Mappi)\
**Post date:** [January 14, 2020, 9:01am UTC](https://forum.rasa.com/t/unable-to-parse-intent-throws-error-rasa-lib-site-packages-rasa-core-processor-py-userwarning-interpreter-parsed-an-intent-hey-that-is-not-defined-in-the-domain-f-interpreter-parsed-an-intent-intent/23477/3 "2020-01-14T09:01:43Z")

</div>

> I am not able to debug the issue since the intent hey is clearly mentioned in the nlu.md and the domain file. Still the interpreter in unable to parse it. Any clues?

You haven’t defined the intent “hey” in your nlu data. It is part of your “greet” intent.

---

<div class="post-metadata">

**Author:** ![JulianGerhard](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/juliangerhard/32/3781_2.png) [@JulianGerhard](https://forum.rasa.com/u/JulianGerhard)\
**Post date:** [January 14, 2020, 9:12am UTC](https://forum.rasa.com/t/unable-to-parse-intent-throws-error-rasa-lib-site-packages-rasa-core-processor-py-userwarning-interpreter-parsed-an-intent-hey-that-is-not-defined-in-the-domain-f-interpreter-parsed-an-intent-intent/23477/4 "2020-01-14T09:12:39Z")

</div>

Hey @mtrworld, @Chatbot_Ra,

I’d suggest the following first debug to try. Create a new python file and paste in the following code:

```
from rasa.nlu.training_data.formats import MarkdownReader

training_data = ()

doc = "<PATH TO NLU.MD>"

reader = MarkdownReader()
reader.read(doc, language='de', fformat='MARKDOWN')
for message in reader.training_examples:
    training_data = training_data + ([message.text, message.get('intent')],)

```

You could then check, if at least the training data is **parsed correctly** inside Rasa leading to a correct model. I assume that there has gone something wrong regarding the training.

Please post the outcome here such that we can evaluate the result.

Kind regards  
Julian

---

<div class="post-metadata">

**Author:** ![Mappi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mappi/32/6579_2.png) [@Mappi](https://forum.rasa.com/u/Mappi)\
**Post date:** [January 14, 2020, 9:17am UTC](https://forum.rasa.com/t/unable-to-parse-intent-throws-error-rasa-lib-site-packages-rasa-core-processor-py-userwarning-interpreter-parsed-an-intent-hey-that-is-not-defined-in-the-domain-f-interpreter-parsed-an-intent-intent/23477/5 "2020-01-14T09:17:19Z")

</div>

@mtrworld /@Chatbot_Ra have this particular issue (Although not exactly the same).

---

<div class="post-metadata">

**Author:** ![Chatbot\_Ra](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chatbot_ra/32/2238_2.png) [@Chatbot\_Ra](https://forum.rasa.com/u/Chatbot_Ra)\
**Post date:** [January 14, 2020, 10:15am UTC](https://forum.rasa.com/t/unable-to-parse-intent-throws-error-rasa-lib-site-packages-rasa-core-processor-py-userwarning-interpreter-parsed-an-intent-hey-that-is-not-defined-in-the-domain-f-interpreter-parsed-an-intent-intent/23477/6 "2020-01-14T10:15:20Z")

</div>

@JulianGerhardLet me summarize your last post, because I am not sure if I got it right: You want us to create a new python file (loocation propably in the root folder). The name of this file can be choosen by us. Let’s say `MarkdownReader.py`. In this file we copy your code and change the path variable to the `NLU.md` file. I am using windows, so it will propably look sth like this:

```auto
C:\Analysen\chatbot_x\rasa_project\data

```

Afterwards you want us to debug the rasa bot project, correct? I tried to run this file (`MarkdownReader.py`) separately, but this doesn’t work.

---

<div class="post-metadata">

**Author:** ![JulianGerhard](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/juliangerhard/32/3781_2.png) [@JulianGerhard](https://forum.rasa.com/u/JulianGerhard)\
**Post date:** [January 14, 2020, 10:19am UTC](https://forum.rasa.com/t/unable-to-parse-intent-throws-error-rasa-lib-site-packages-rasa-core-processor-py-userwarning-interpreter-parsed-an-intent-hey-that-is-not-defined-in-the-domain-f-interpreter-parsed-an-intent-intent/23477/7 "2020-01-14T10:19:24Z")

</div>

Hi @Chatbot_Ra,

we have to figure out why the bot thinks there exists an intent called “hey” instead of only treating hey as a training sample for the greet-intent. Without having more insights this is a tough one. My assumption was, that the bot got something wrong while training leading to my suggestion to check, if the training data was parsed correctly.

In Windows, your path has to be:

```auto
C:\\Analysen\\chatbot_x\\rasa_project\\data\\nlu.md

```

Can you post the error you got?

Regards  
Julian

---

<div class="post-metadata">

**Author:** ![Chatbot\_Ra](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chatbot_ra/32/2238_2.png) [@Chatbot\_Ra](https://forum.rasa.com/u/Chatbot_Ra)\
**Post date:** [January 14, 2020, 10:50am UTC](https://forum.rasa.com/t/unable-to-parse-intent-throws-error-rasa-lib-site-packages-rasa-core-processor-py-userwarning-interpreter-parsed-an-intent-hey-that-is-not-defined-in-the-domain-f-interpreter-parsed-an-intent-intent/23477/8 "2020-01-14T10:50:40Z")

</div>

Oh if this is the case, I can tell you right now, that (at least in my case) the training works fine. Why do I think so?:

1. The bot works as it should. No problems. This is why the warning is so strange
2. After training the model with `supervised_embeddings` I get this message:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/5/56cabdd8f0b273639ec1d808e96356cc06572872.png)

I have marked the intent `name` and the entity `name`. Looks for me, that this is clearly recognized.

However, running this model / bot I get this:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/4/4a6f23ce94c9d9826e1d05f4eac87ab8f51cd914.png)

It seems, the intent is unknown for the model! I marked it red! Above, you can read an other warning, which I think has nothing to do with this, because it used to appear some time before this problem came up, and is not so crucial according to what I found out.

By the way, I do not know, why the intent name is given as `name:` in the warning. I do not see where the colon `:` is coming from. This doens’t seem to be the case for @mtrworld

---

<div class="post-metadata">

**Author:** ![JulianGerhard](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/juliangerhard/32/3781_2.png) [@JulianGerhard](https://forum.rasa.com/u/JulianGerhard)\
**Post date:** [January 14, 2020, 11:08am UTC](https://forum.rasa.com/t/unable-to-parse-intent-throws-error-rasa-lib-site-packages-rasa-core-processor-py-userwarning-interpreter-parsed-an-intent-hey-that-is-not-defined-in-the-domain-f-interpreter-parsed-an-intent-intent/23477/9 "2020-01-14T11:08:40Z")

</div>

Hi @Chatbot_Ra,

this is indeed interesting. I think we have to dig deeper. The method which is responsible for that line is defined in `processor.py` as follows:

`def _log_unseen_features(self, parse_data: Dict[Text, Any]) -> None:`

I’d suggest to print/log this `parse_data` object first to determine if the error comes from the caller or not. I have the feeling that there is a light bug in some formatting method.

Regards  
Julian

---

<div class="post-metadata">

**Author:** ![Chatbot\_Ra](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chatbot_ra/32/2238_2.png) [@Chatbot\_Ra](https://forum.rasa.com/u/Chatbot_Ra)\
**Post date:** [January 14, 2020, 12:13pm UTC](https://forum.rasa.com/t/unable-to-parse-intent-throws-error-rasa-lib-site-packages-rasa-core-processor-py-userwarning-interpreter-parsed-an-intent-hey-that-is-not-defined-in-the-domain-f-interpreter-parsed-an-intent-intent/23477/10 "2020-01-14T12:13:40Z")

</div>

@JulianGerhard I added a print line to the method that you have mentioned in your previous post:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/9/9e20364ca7a02ffc6b7d9e50545749c35f4af54d.png)

Running the bot gives me this:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/f/fed082d860d9ee318083b385c8d142c4dee844f5.png)

Here `greet`, `yes_Datenschutz`, `yes_user` are intents of my bot. They seem to work. The different to the intent `name` is, that I do not use them to fill a slot. More about this, I have explained [here](http://forum.rasa.com/t/how-to-set-a-slot-value-in-custom-form/23336). In this post, I had the feeling, that the problem maybe has to do with the way I set the slots in my custom form. Still I am not sure about this!

What I do not understand, why rasa seems to add a colon to the intent `name`.

---

<div class="post-metadata">

**Author:** ![Chatbot\_Ra](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chatbot_ra/32/2238_2.png) [@Chatbot\_Ra](https://forum.rasa.com/u/Chatbot_Ra)\
**Post date:** [January 15, 2020, 8:48am UTC](https://forum.rasa.com/t/unable-to-parse-intent-throws-error-rasa-lib-site-packages-rasa-core-processor-py-userwarning-interpreter-parsed-an-intent-hey-that-is-not-defined-in-the-domain-f-interpreter-parsed-an-intent-intent/23477/11 "2020-01-15T08:48:03Z")

</div>

I tried to debug Rasa. As you can see in the figure below, at some point the intent `name` suddently becomes `name:`. Where does the colon suddenly comes from??? Since I am not an expert in debugging, I was not able to trace back, where this happends (for now!).

I think one possible problem is the method `get_parsing_states` in which the `intent_name` is set. You can look it up [in the source code here](https://github.com/RasaHQ/rasa/blob/7f8e3e44e550dc519c82b4cc00fb9a616daf4b30/rasa/core/domain.py)!

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/b/b4e9ee8a656161b3fad13dab7da8f9952c4aa3cd.png)

It is interesting that the actual value of the intent `name` is set correctly to `Peter`. Therefore, I am starting to think, there is a bug in rasa code which parses the intent wrong.

What do you think?

---

<div class="post-metadata">

**Author:** ![JulianGerhard](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/juliangerhard/32/3781_2.png) [@JulianGerhard](https://forum.rasa.com/u/JulianGerhard)\
**Post date:** [January 18, 2020, 12:35pm UTC](https://forum.rasa.com/t/unable-to-parse-intent-throws-error-rasa-lib-site-packages-rasa-core-processor-py-userwarning-interpreter-parsed-an-intent-hey-that-is-not-defined-in-the-domain-f-interpreter-parsed-an-intent-intent/23477/12 "2020-01-18T12:35:01Z")

</div>

Hi @Chatbot_Ra,

I think I found the error. Look at the “latest\_message” dictionary. As far as I know, e.g. the format:

```
 utter_ask_color:
- text: "what color would you like?"
  buttons:
  - title: "blue"
    payload: '/choose{"color": "blue"}'
  - title: "red"
    payload: '/choose{"color": "red"}'

```

used for setting slots with Buttons leads to the interpretation:

> You can use buttons as a shortcut. Rasa Core will send messages starting with a `/` to the `RegexInterpreter` , which expects NLU input in the same format as in story files, e.g. `/intent{entities}` . For example, if you let users choose a color by clicking a button, the button payloads might be `/choose{"color": "blue"}` and `/choose{"color": "red"}` .

as explained [here](https://rasa.com/docs/rasa/core/slots/#slots-set-by-clicking-buttons).

Now according to what you posted, there is:

{ ‘text’: ' **/name:** {“name”: “Peter”}, ‘intent’: {‘name’: ‘name:’, ‘confidence’: 1.0}  
`{ 'text': '/name:{"name": "Peter"}, 'intent': {'name': 'name:', 'confidence': 1.0}`

which absolutely makes sense for `/intent{entities}`.

So you simply need to verify how your inputs to the bot are done and remove the `':'` from `/name:` - then you should be done.

Did that help?`

Kind regards  
Julian

---

<div class="post-metadata">

**Author:** ![Chatbot\_Ra](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chatbot_ra/32/2238_2.png) [@Chatbot\_Ra](https://forum.rasa.com/u/Chatbot_Ra)\
**Post date:** [January 20, 2020, 10:30am UTC](https://forum.rasa.com/t/unable-to-parse-intent-throws-error-rasa-lib-site-packages-rasa-core-processor-py-userwarning-interpreter-parsed-an-intent-hey-that-is-not-defined-in-the-domain-f-interpreter-parsed-an-intent-intent/23477/13 "2020-01-20T10:30:45Z")

</div>

Hey, thank you very much for your response!

If I understand you correctly, you are talking about “how to set a slot by clicking a button”. However, when I ask for the user name (last name, birthday, customer-id,…) I am not setting a button. The custom form asks the user (“What is you first name?”) and the user types it into the field to set the slot directly.

Please do not understand me wrong. I also have the strong feeling, that setting the slot correclty is the key to the problem. The second option for me is that Rasa has a bug.

Let’s look at the problem more cloosly to make sure that everybody can understand it:

In my domain file I have:

```auto
intents:
 - name
 - name_last

entities:
 - name
 - name_last

slots:
  name:
    type: unfeaturized
  name_last:
    type: unfeaturized

actions:
 - utter_ask_name
 - utter_ask_name_last

forms:
  - authenticate_form

templates:

  utter_ask_name:
    - text: What is your first name?
      buttons:
        - title: "FirstName"
          payload: "name"

  utter_ask_name_last:
    - text: What is your last name?
      buttons:
        - title: "LastName"
          payload: "name_last"

```

This is how I set the slot. As you can see, it looks like creating a button, but the way I set the `payload` will not create a button. I have to admit, it was not a smart idea to call every item (intent, entity and slot) by the same name. As far as I checked. this is not the root of the problem. **According to your last post, what is wrong about this? I don’t see what I did wrong!**

I am not sure if this is important, but let me explain what else I do:

In the stories.md file I do this:

```auto

## story_form_happy_path
- authenticate_form
- form{"name": "authenticate_form"} <!--- start form --> 
- slot{"name": "Sam"}    
- slot{"name_last": "Johns"}  
- form{"name": null} <!--- finish form. This is set when the form has filled all of its required slots --> 

```

Not sure, if this is the correct way, but it seems to work.

Lastly, let me explain my custom form which asks all relevent questions. If you need to collect multiple pieces of information (name, name\_last, birthday,…) in a row, Rasa recommends to create a `FormAction` . This is a single action which contains the logic to loop over the required slots and ask the user for this information. As far as I understand, this is where I set the slots.

```auto
class AuthenticateForm(FormAction):

    def name(self):
        # type: () -> Text
        return "authenticate_form"

    @staticmethod
    def required_slots(tracker):
        # type: () -> List[Text]
      
        return ["name", "name_last", "birthday"]

    def submit(self, dispatcher, tracker, domain):
        # type: (CollectingDispatcher, Tracker, Dict[Text, Any]) -> List[Dict]

        return []

    def slot_mappings(self):
        # type: () -> Dict[Text: Union[Dict, List[Dict]]]
        return {
            "name": [self.from_entity(entity="name", not_intent=["chitchat"])],
            "name_last": [self.from_entity(entity="name_last", not_intent=["chitchat"])],
            "birthday": [self.from_entity(entity="birthday", not_intent=["chitchat"])]
        }

    def validate(self,
                 dispatcher: CollectingDispatcher,
                 tracker: Tracker,
                 domain: Dict[Text, Any]) -> List[Dict]:

        ....

        # validation succeed, set the slots values to the extracted values
        return [SlotSet(slot, value) for slot, value in slot_values.items()]

```

So, these are all potential error sources that I can think of.

Note: Setting the slots the way I explained above is working! The bot is excatly doing what it is supposed to do. However, each time I set the slot, I get this warning, that I mentioned earlier.
