# Entities not recognized by DIET therefore not training bot as well as not allowing slots to work

**URL:** <https://forum.rasa.com/t/entities-not-recognized-by-diet-therefore-not-training-bot-as-well-as-not-allowing-slots-to-work/29979>\
**Category:** Rasa Open Source\
**Created:** [June 9, 2020, 9:45am UTC](https://forum.rasa.com/t/entities-not-recognized-by-diet-therefore-not-training-bot-as-well-as-not-allowing-slots-to-work/29979 "2020-06-09T09:45:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexmax900](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/alexmax900/32/9720_2.png) [@Alexmax900](https://forum.rasa.com/u/Alexmax900)\
**Post date:** [June 9, 2020, 9:45am UTC](https://forum.rasa.com/t/entities-not-recognized-by-diet-therefore-not-training-bot-as-well-as-not-allowing-slots-to-work/29979/1 "2020-06-09T09:45:16Z")

</div>

So I am new to this and I am trying to learn how to use Rasa step by step. I have reached a problem where when I _rasa train_ it trains all fine except for the entities where the error occurs. This is a problem for me since i am trying to add slots into my code but because it does not recognize any entities when the bot responds it says _none_

```
Your input -> hi
Hey! Who are you?
Your input -> I am Alex
And where are you from?
Your input -> Germany
So your name is None and you are from None, correct?
Your input -> Yews
Then, I will talk to you later!

c:\users\alex\appdata\local\programs\python\python37\lib\site-packages\rasa\utils\common.py:351: UserWarning: You specified 'DIET' to train entities, but no entities are present in the training data. Skip training of entities.

```

I tried changing the DIETclassifier to the CRFentityextractor but that did not help.

**nlu**

```
## intent:greet
 - hey
 - hello
 - hi
 - good morning
 - good evening
 - hey there

## intent:affirm
 - yes
 - yea
 - yeah
 - yup

## intent:name_given
 - My name is [Alex] (name)
 - I am [Alex] (name)
 - You can call me [Alex] (name)
 - My name is [Jim] (name)
 - I am [Jim] (name)
 - You can call me [Jim] (name)
 - My name is [Sam] (name)
 - I am [Sam] (name)
 - You can call me [Sam] (name)
 - My name is [Roland] (name)
 - I am [Roland] (name)
 - You can call me [Roland] (name)

## intent:country_from
 - I am from [Germany] (country)
 - I come from [Germany] (country)
 - [Germany] (country)
 - I am from [Vietnam] (country)
 - I come from [Vietnam] (country)
 - [Vietnam] (country)
 - I am from [Spain] (country)
 - I come from [Spain] (country)
 - [Spain] (country)
 - I am from [Japan] (country)
 - I come from [Japan] (country)
 - [Japan] (country)

```

**stories**

```
## name path
* greet
  - utter_greet
* name_given
  - utter_country_Q
* country_from
 - utter_show_name_country
*affirm
 -utter_goodbye

```

**domain**

```
intents:
  - greet
  - name_given
  - country_from
  - affirm

entities:
 - name
 - country

slots:
 name:
  type: text
 country:
  type: text

responses:
  utter_greet:
  - text: "Hey! Who are you?"
  utter_goodbye:
  - text: "Then, I will talk to you later!"
  utter_country_Q:
  - text: "And where are you from?"
  utter_show_name_country:
  - text: "So your name is {name} and you are from {country}, correct?"

session_config:
  session_expiration_time: 60
  carry_over_slots_to_new_session: true

```

Here is the full rasa train response

```
C:\Users\Alex\Documents\Work\Rasa>rasa train
2020-06-09 15:43:33 INFO rasa.model - Data (nlu-config) for NLU model section changed.
Core stories/configuration did not change. No need to retrain Core model.
Training NLU model...
2020-06-09 15:43:33 INFO rasa.nlu.training_data.training_data - Training data stats:
2020-06-09 15:43:33 INFO rasa.nlu.training_data.training_data - Number of intent examples: 34 (4 distinct intents)
2020-06-09 15:43:33 INFO rasa.nlu.training_data.training_data - Found intents: 'name_given', 'country_from', 'affirm', 'greet'
2020-06-09 15:43:33 INFO rasa.nlu.training_data.training_data - Number of response examples: 0 (0 distinct responses)
2020-06-09 15:43:33 INFO rasa.nlu.training_data.training_data - Number of entity examples: 0 (0 distinct entities)
2020-06-09 15:43:33 INFO rasa.nlu.model - Starting to train component WhitespaceTokenizer
2020-06-09 15:43:33 INFO rasa.nlu.model - Finished training component.
2020-06-09 15:43:33 INFO rasa.nlu.model - Starting to train component RegexFeaturizer
2020-06-09 15:43:33 INFO rasa.nlu.model - Finished training component.
2020-06-09 15:43:33 INFO rasa.nlu.model - Starting to train component LexicalSyntacticFeaturizer
2020-06-09 15:43:33 INFO rasa.nlu.model - Finished training component.
2020-06-09 15:43:33 INFO rasa.nlu.model - Starting to train component CountVectorsFeaturizer
2020-06-09 15:43:33 INFO rasa.nlu.model - Finished training component.
2020-06-09 15:43:33 INFO rasa.nlu.model - Starting to train component CountVectorsFeaturizer
2020-06-09 15:43:33 INFO rasa.nlu.model - Finished training component.
2020-06-09 15:43:33 INFO rasa.nlu.model - Starting to train component DIETClassifier
c:\users\alex\appdata\local\programs\python\python37\lib\site-packages\rasa\utils\common.py:351: UserWarning: You specified 'DIET' to train entities, but no entities are present in the training data. Skip training of entities.
Epochs: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:08<00:00, 11.86it/s, t_loss=1.123, i_loss=0.012, i_acc=1.000]
2020-06-09 15:43:46 INFO rasa.utils.tensorflow.models - Finished training.
2020-06-09 15:43:46 INFO rasa.nlu.model - Finished training component.
2020-06-09 15:43:46 INFO rasa.nlu.model - Starting to train component EntitySynonymMapper
2020-06-09 15:43:46 INFO rasa.nlu.model - Finished training component.
2020-06-09 15:43:46 INFO rasa.nlu.model - Starting to train component ResponseSelector
2020-06-09 15:43:46 INFO rasa.nlu.selectors.response_selector - Retrieval intent parameter was left to its default value. This response selector will be trained on training examples combining all retrieval intents.
2020-06-09 15:43:47 INFO rasa.nlu.model - Finished training component.
2020-06-09 15:43:47 INFO rasa.nlu.model - Successfully saved model into 'C:\Users\Alex\AppData\Local\Temp\tmphy0r4uqu\nlu'
NLU model training completed.
Your Rasa model is trained and saved at 'C:\Users\Alex\Documents\Work\Rasa\models\20200609-154347.tar.gz'.

```

Any help would be appreciative, I can’t find the solution at all.

---

<div class="post-metadata">

**Author:** ![MuraliChandran14](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/muralichandran14/32/9120_2.png) [@MuraliChandran14](https://forum.rasa.com/u/MuraliChandran14)\
**Post date:** [June 9, 2020, 9:55am UTC](https://forum.rasa.com/t/entities-not-recognized-by-diet-therefore-not-training-bot-as-well-as-not-allowing-slots-to-work/29979/2 "2020-06-09T09:55:47Z")

</div>

Hi @Alexmax900,

The issue is giving space in front of an entity will not detect entities in entity extraction.

> [@Alexmax900](#):
>
> ```auto
> ## intent:name_given
> - My name is [Alex] (name)
> - I am [Alex] (name)
> 
> ```

```
Re-write your nlu.md like this:
  - My name is [Alex](name)
 - I am [Alex](name)

```

> [@Alexmax900](#):
>
> ```auto
> ## intent:country_from
> - I am from [Germany] (country)
> - I come from [Germany] (country)
> 
> ```

```
Re-write your nlu.md like this:
 - I am from [Germany](country)
 - I come from [Germany](country)

```

More information you can refer here

> [@Encountered an exception while running action 'action\_search\_restaurant'. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information](http://forum.rasa.com/t/encountered-an-exception-while-running-action-action-search-restaurant-bot-will-continue-but-the-actions-events-are-lost-please-check-the-logs-of-your-action-server-for-more-information/29880):
>
> getting this error, logs in “rasa run actions”: Exception occurred while handling uri: ‘[http://localhost:5055/webhook](http://localhost:5055/webhook)’ Traceback (most recent call last): File “c:\python3.6\lib\site-packages\sanic\app.py”, line 942, in handle\_request response = await response File “c:\python3.6\lib\site-packages\rasa\_sdk\endpoint.py”, line 86, in webhook result = await executor.run(action\_call) File “c:\python3.6\lib\site-packages\rasa\_sdk\executor.py”, line 280, in run events = action(dispatcher, tracker, dom…

---

<div class="post-metadata">

**Author:** ![Alexmax900](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/alexmax900/32/9720_2.png) [@Alexmax900](https://forum.rasa.com/u/Alexmax900)\
**Post date:** [June 9, 2020, 10:11am UTC](https://forum.rasa.com/t/entities-not-recognized-by-diet-therefore-not-training-bot-as-well-as-not-allowing-slots-to-work/29979/3 "2020-06-09T10:11:16Z")

</div>

Thanks a lot that was the answer
