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

Created on 5 Apr 2020  Â·  5Comments  Â·  Source: RasaHQ/rasa

Rasa version:1.9.4

Rasa SDK version (if used & relevant):1.9.0

Rasa X version (if used & relevant):

Python version:3.7

Operating system (windows, osx, ...): Windows 10

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):

c:\users\nitik\appdata\local\programs\python\python37\lib\site-packages\rasa\utils\common.py:351: 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 25, column 3
found duplicate key "-text" with value "Hi.My name is medicare locator. How can I help you today ?" (original value: "Hello. I am a medicare locator. I can help you find nearest hospital. How can I help ?")
  in "<unicode string>", line 43, column 3

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.'

Command or request that led to error:

(base) C:\Rasa_Projects\new_rasa_project>rasa train

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

# Configuration for Rasa NLU.
# https://rasa.com/docs/rasa/nlu/components/
language: en
pipeline:
  - name: WhitespaceTokenizer
  - name: RegexFeaturizer
  - name: LexicalSyntacticFeaturizer
  - name: CountVectorsFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: "char_wb"
    min_ngram: 1
    max_ngram: 4
  - name: DIETClassifier
    epochs: 100
  - name: EntitySynonymMapper
  - name: ResponseSelector
    epochs: 100

# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
  - name: MemoizationPolicy
  - name: TEDPolicy
    max_history: 5
    epochs: 100
  - name: MappingPolicy

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


intents:
  - greet
  - goodbye
  - affirm
  - deny
  - mood_great
  - mood_unhappy
  - search_provider
  - bot_challenge
  - thanks

entities:
  -location
  -facility_type

slots:
  location:
    type:text
  facility_type:
    type: text    
  address:
    type:unfeaturized

responses:
  utter_greet:
  - text: "Hey! How are you?"

  utter_cheer_up:
  - text: "Here is something to cheer you up:"
    image: "https://i.imgur.com/nGF1K8f.jpg"

  utter_did_that_help:
  - text: "Did that help you?"

  utter_happy:
  - text: "Great, carry on!"

  utter_goodbye:
  - text: "Bye"

  utter_how_can_i_help:
  -text: "Hello. I am a medicare locator. I can help you find nearest hospital. How can I help ?"
  -text: "Hi.My name is medicare locator. How can I help you today ?"

  utter_ask_location:
  -text: "Can you provide your location please ?"
  -text: "To find the nearest {facility_type} I need your address."   

  action_facility_search:

  utter_iamabot:
  - text: "I am a bot, powered by Rasa."

session_config:
  session_expiration_time: 60
  carry_over_slots_to_new_session: true
type

All 5 comments

Thanks for the issue, @TyDunn will get back to you about it soon!

You may find help in the docs and the forum, too 🤗

Thanks for the issue, @rgstephens will get back to you about it soon!

You may find help in the docs and the forum, too 🤗

Add spaces between - and text for utter_how_can_i_help and utter_ask_location. You can check any errors in your yaml with the provided links in the error message, or found here.

This looks like it might be an older example bot -- I'd recommend using the examples in the repo itself.

Just as well -- I don't think you'd want to have action_facility_search as a response, as those are response templates the bot will use in predicting responses to user messages, you'll want to add a new section in the file with below:

actions:
- action_facility_search

Thanks a lot for solving my issue and providing me with training examples .

On Tue, Apr 7, 2020 at 1:34 AM Kevin Castro notifications@github.com
wrote:

Add spaces between - and text for utter_how_can_i_help and
utter_ask_location. You can check any errors in your yaml with the
provided links in the error message, or found here
http://www.yamllint.com/.

This looks like it might be an older example bot -- I'd recommend using
the examples in the repo itself
https://github.com/RasaHQ/rasa/tree/master/examples.

Just as well -- I don't think you'd want to have action_facility_search
as a response, as those are response templates the bot will use in
predicting responses to user messages, you'll want to add a new section in
the file with below:

actions:

  • action_facility_search

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/RasaHQ/rasa/issues/5579#issuecomment-610008015, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/APCBPLNHT34AMO6267N7OW3RLIYTZANCNFSM4MAJEP3Q
.

Add spaces between - and text for utter_how_can_i_help and utter_ask_location. You can check any errors in your yaml with the provided links in the error message, or found here.

This looks like it might be an older example bot -- I'd recommend using the examples in the repo itself.

Just as well -- I don't think you'd want to have action_facility_search as a response, as those are response templates the bot will use in predicting responses to user messages, you'll want to add a new section in the file with below:

actions:
- action_facility_search

many thank

Was this page helpful?
0 / 5 - 0 ratings