Loading domain from 'domain.yml' failed. Using empty domain

Rasa version:2.0.0a2

Rasa SDK version (if used & relevant):2.0.0a2

Rasa X version (if used & relevant):

Python version:3.8.0

Operating system (windows, osx, …): Windows 10, wsl, Ubuntu

Issue: Hey! Whenever I try to run my rasa project , I get an error stating that there are duplicate keys in yaml file and it takes the empty domain file

Error (including full traceback):

/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/utils/common.py:384: UserWarning: Loading domain from 'domain.yml' failed. Using empty domain. Error: 'The provided yaml file contains a duplicated key: 'while constructing a mapping
  in "<unicode string>", line 37, column 7
found duplicate key "text" with value "Hi, How can I help you!" (original value: "hey there! How may i help you")
  in "<unicode string>", line 38, column 7

To suppress this check see:
    http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys

Duplicate keys will become an error in future releases, and are errors
by default when using the new API.
'. You can use http://www.yamllint.com/ to validate the yaml syntax of your file.'
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'greet' on line 2. Please, make sure that all intents are listed in your domain yaml.  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 4. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 6. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 9. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'affirm' on line 12. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'greet' on line 17. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 19. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 22. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'affirm' on line 25. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'greet' on line 30. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 32. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 34. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 37. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'greet' on line 43. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 45. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 47. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 50. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'goodbye' on line 53. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'greet' on line 57. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 59. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 61. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 64. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'goodbye' on line 67. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'greet' on line 72. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 74. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 77. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'goodbye' on line 81. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'greet' on line 84. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 86. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 88. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 91. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'greet' on line 98. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 100. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'affirm' on line 105. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'greet' on line 110. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 112. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'affirm' on line 117. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'greet' on line 122. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 124. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'restaurant_search' on line 127. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'affirm' on line 131. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/core/training/story_reader/markdown_story_reader.py:217: UserWarning: Found unknown intent 'goodbye' on line 135. Please, make sure that all intents are listed in your domain yaml.
  raise_warning(
Project validation completed with errors.

(foodieRasa) root@Yasmeen:~/foodieChatbot/Rasa_basic_folder#  

Content of configuration file (config.yml) (if relevant):

language: en
pipeline:
- name: "SpacyNLP"
- name: "SpacyTokenizer"
- name: "SpacyFeaturizer"
- name: "RegexFeaturizer"
- name: "CRFEntityExtractor"
- name: "EntitySynonymMapper"
- name: "SklearnIntentClassifier"
policies:
- name: MemoizationPolicy
  - name: TEDPolicy
    max_history: 5
    epochs: 100
- name: MappingPolicy

Content of domain file (domain.yml) (if relevant):

actions:
   - action_search_restaurants
   - utter_ask_cuisine
   - utter_ask_howcanhelp
   - utter_ask_location
   - utter_default
   - utter_goodbye
   - utter_greet

entities:
   - cuisine
   - location
   - price
   - people
   - cities
  
intents:
- affirm
- restaurant_search
- greet
- goodbye
- stop
- deny

responses:
  - utter_ask_cuisine:
      text: "what kind of cuisine would you like?"
  - utter_ask_howcanhelp:
      text: "how can I help you?"
  - utter_ask_location:
      text: "In what location?"
  - utter_default:
      text: "i cannot understand"
  - utter_goodbye:
      text: "goodbye :)"
  - utter_greet:
      text: "hey there! How may i help you"
      text: "Hi, How can I help you!"
      text: "Hey, How is it going. How May I help you Today"
      
session_config:
  carry_over_slots_to_new_session: true
  session_expiration_time: 60
slots:
  cuisine:
    type: text
  location:
    type: text
  price:
    type: text

This is probably the most relevant part of the error

It’s a bit difficult to see where line 38 column 7 is, could you use a code block to attach the file (the </> symbol), so that it can render properly?

I would assume it’s this bit: utter_greet: text: “hey there! How may i help you” text: “Hi, How can I help you!” text: “Hey, How is it going. How May I help you Today”, which is difficult to see if it’s valid due to the missing newlines, but that seems to be where the issue is.

@rudi is right. utterances are a list, so you need a - before the text. Otherwise it is interpreted as a dict, hence the duplicate key error. You should update your responses to look as so:

responses:
  - utter_ask_cuisine:
     - text: "what kind of cuisine would you like?"
  - utter_ask_howcanhelp:
     - text: "how can I help you?"
  - utter_ask_location:
     - text: "In what location?"
  - utter_default:
     - text: "i cannot understand"
  - utter_goodbye:
     - text: "goodbye :)"
  - utter_greet:
     - text: "hey there! How may i help you"
     - text: "Hi, How can I help you!"
     - text: "Hey, How is it going. How May I help you Today"

Yes, I realized that, Thank you. I was able to train nlu and core, however when I run (rasa shell ) I am getting following error:

`Your input ->  i want find restaurants in delhi
/root/foodieChatbot/foodieRasa/lib/python3.8/site-packages/rasa/utils/common.py:384: UserWarning: Interpreter parsed an intent 'i want find restaurants in delhi' which is not defined in the domain. Please make sure all intents are listed in the domain.
  More info at https://rasa.com/docs/rasa/core/domains/

2020-08-25 04:38:45 WARNING  rasa.core.featurizers  - Feature 'intent_hi' could not be found in feature map.
2020-08-25 04:38:45 WARNING  rasa.core.featurizers  - Feature 'intent_hello' could not be found in feature map.
2020-08-25 04:38:45 WARNING  rasa.core.featurizers  - Feature 'intent_i want find restaurants in delhi' could not be found in feature map.
2020-08-25 04:38:45 WARNING  rasa.core.featurizers  - Feature 'intent_hi' could not be found in feature map.
2020-08-25 04:38:45 WARNING  rasa.core.featurizers  - Feature 'intent_hello' could not be found in feature map.
2020-08-25 04:38:45 WARNING  rasa.core.featurizers  - Feature 'intent_i want find restaurants in delhi' could not be found in feature map.
goodbye :)`

Looks like it is parsing with a RegexInterpreter instead of an NLUInterpreter (intent classified as the text you provided)

How did you train your bot?

I have found the solution. Had not trained my nlu, plus my stories were not in sync, its working now. You can close the issue.