Error: can't train stories

I am trying to train a new bot, but I got these errors.

$ python -m rasa_core.train -d domain.yml -s data/stories.md -o models/dialogue
Traceback (most recent call last):
  File "/Users/wisionlearning/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/wisionlearning/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/wisionlearning/rasa_core/rasa_core/train.py", line 245, in <module>
    additional_arguments)
  File "/Users/wisionlearning/rasa_core/rasa_core/train.py", line 176, in train_dialogue_model
    policies=policies)
  File "/Users/wisionlearning/rasa_core/rasa_core/agent.py", line 198, in __init__
    self.domain = self._create_domain(domain)
  File "/Users/wisionlearning/rasa_core/rasa_core/agent.py", line 635, in _create_domain
    return Domain.load(domain)
  File "/Users/wisionlearning/rasa_core/rasa_core/domain.py", line 89, in load
    return cls.from_yaml(read_file(filename))
  File "/Users/wisionlearning/rasa_core/rasa_core/domain.py", line 93, in from_yaml
    cls.validate_domain_yaml(yaml)
  File "/Users/wisionlearning/rasa_core/rasa_core/domain.py", line 123, in validate_domain_yaml
    source_data = utils.read_yaml_string(yaml)
  File "/Users/wisionlearning/rasa_core/rasa_core/utils.py", line 343, in read_yaml_string
    return yaml_parser.load(string)
  File "/Users/wisionlearning/anaconda3/lib/python3.6/site-packages/ruamel/yaml/main.py", line 325, in load
    return constructor.get_single_data()
  File "/Users/wisionlearning/anaconda3/lib/python3.6/site-packages/ruamel/yaml/constructor.py", line 106, in get_single_data
    node = self.composer.get_single_node()
  File "_ruamel_yaml.pyx", line 706, in _ruamel_yaml.CParser.get_single_node
  File "_ruamel_yaml.pyx", line 724, in _ruamel_yaml.CParser._compose_document
  File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
  File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
  File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
  File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
  File "_ruamel_yaml.pyx", line 773, in _ruamel_yaml.CParser._compose_node
  File "_ruamel_yaml.pyx", line 850, in _ruamel_yaml.CParser._compose_sequence_node
  File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
  File "_ruamel_yaml.pyx", line 891, in _ruamel_yaml.CParser._compose_mapping_node
  File "_ruamel_yaml.pyx", line 904, in _ruamel_yaml.CParser._parse_next_event
ruamel.yaml.parser.ParserError: while parsing a block mapping
  in "<unicode string>", line 155, column 5
did not find expected key
  in "<unicode string>", line 156, column 5

domain.yml:

intents:
  - greet
  - style_citation
  - citing_works
  - bib
  - why_cite
  - teach_cite
  - pare_ref
  - endnotes
  - footnotes
  - cite_every
  - cite_lang
  - com_know
  - cite_book
  - cite_art
  - mla
  - apa
  - chi
  - quote
  - para
  - patch
  - cite_own_work
  - confirm
  - deny
  - greet
  - citation
  - writing

actions:
- utter_default 
- utter_greet
- utter_general_help
- utter_exception
- utter_other_help
- utter_end
- utter_cite_intro
- utter_cite_help
- utter_cite_style
- utter_cite_MLA
- utter_cite_APA
- utter_cite_chi
- utter_loc_cite
- utter_how_cite_work
- utter_pare
- utter_pare_ex
- utter_end_ex
- utter_foot_ex
- utter_def_bib
- utter_cite_why
- utter_cite_que
- utter_cite_com
- utter_cite_lang
- utter_def_com
- utter_teach_cite
- utter_what_source
- utter_book_author
- utter_book_type
- utter_book_ex1
- utter_book_ex2
- utter_book_ex3
- utter_book_ex4
- utter_art_type
- utter_art_ex1
- utter_art_ex2
- utter_art_ex3
- utter_link_ex
- utter_intro_writing
- utter_help_writing
- utter_intro_quo
- utter_intro_quo1
- utter_quo_ex
- utter_intro_para
- utter_intro_para1
- utter_para_ex
- utter_intro_pat
- utter_pat_ex
- utter_intro_cite_own
- utter_intro_cite_own1
- utter_cite_own_ex
    
templates:
  utter_default:
  - text: "Sorry, I didn’t understand that"
  utter_greet:
  - text: "Hi, I am nStudy Bot. I can help you with avoding plagarism."
    buttons:
    - title: "Okay"
      payload: "okay"
  utter_general_help:
  - text: "What kind of help do you need?"
    buttons:
    - title: "Citation"
      payload: "Citation"
    - title: "Writing-to-cite"
      payload: "Writing-to-cite"    
  utter_exception:
  - text: "Sorry, could you be more specific about what you want help with?"
  utter_other_help:
  - text: "Do you need any other help?"
    buttons:
    - title: "Okay"
      payload: "Okay"
    - title: "No"
      payload: "No"
  utter_end:
  - text: "Thank you for using nStudy Plagarism Bot"
    buttons:
    - title: "Okay"
      payload: "Okay"
  utter_cite_intro:
  - text: "Citing,also known as referencing, is the practice of acknowledging in your paper the sources from which you obtained information. You cite your sources by providing information about the author’s name, publication date, and so on. Citations may take the form of parenthetical notes like this (Smith, 2002, p. 67), or footnotes, or endnotes."
  utter_cite_help:
  - text: "Tell me what kind of help you need in citation."
    buttons:
    - title: "Citation styles"
      payload: "Citation styles"
    - title: "How citing works"
      payload: "How citing works"    
    - title: "What is Biblliography"
      payload: "What is Biblliography"
    - title: "Why should we cite"
      payload: "Why should we cite" 
    - titles: "Teach me how to cite"
      payload: "Teach me how to cite"
  utter_cite_style:
  - text: "What citation style you use?"
    buttons:
    - title: "MLA"
      payload: "MLA"
    - title: "APA"
      payload: "APA"    
    - title: "Chicago"
      payload: "Chicago"   
  utter_cite_MLA:
  - text: "For MLA, This guide is based on the MLA Handbook for Writers of Research Papers, 7th ed. and provides selected citation examples for common types of sources. For more detailed information please consult the print version of the handbook. Graduate students and professional writers might also need to consult the MLA Style Manual and Guide to Scholarly Publishing, 3rd ed."
    buttons:
    - title: "Okay"
      payload: "Okay"
  utter_cite_APA:
  - text: "For APA, This guide is based on the Publication Manual of the American Psychological Association, 6th ed. It provides selected citation examples for common types of sources. For more detailed information please consult a print copy of the style manual."
    buttons:
    - title: "Okay"
      payload: "Okay"
  utter_cite_chi:
  - text: "For Chicago, This guide is based on The Chicago Manual of Style (17th ed.) and provides only selected citation examples for commonly used sources, and of notes/bibliography style only. For more detailed information, directly consult a print copy or online."
    buttons:
    - title: "Okay"
      payload: "Okay"
  utter_loc_cite:
  - text: "Citation should appear in two places a. in the body of your essay and b. at the end of the essay (e.g. Reference section, works cited, or bibiliography)."
    buttons:
    - title: "Okay"
      payload: "Okay"
  utter_how_cite_work:
  - text: "Tell me what do you want to know about how citing works. "
    - title: "parenthetical references"
      payload: "parenthetical references"
    - title: "endnotes (not for APA style)"
      payload: "endnotes (not for APA style)"    
    - title: "footnotes"
      payload: "footnotes"
  utter_pare:
  - text: "A parenthetical reference is a citation placed in parentheses in the text of your paper. In APA style, a parenthetical reference includes the following information: author, year of publication, and page number(s). Do you need an example?"
    buttons:
    - title: "Yes"
      payload: "Yes"
    - title: "No"
      payload: "No"
  utter_pare_ex:
  - text: "In Media Mania, the authors argue that teachers and peers are a more powerful influence than television (MacKay & Pennie, 2002). They indicated that (television is the least predictor in our statistical model) (MacKay & Pennie, 2002, p.33). You can see that when you paraphrase you just need the authors' last names and the year, and when you quote directly, you need the page number."
    buttons:
    - title: "Okay"
      payload: "Okay"
  utter_end_ex:
  - text: "Endnotes are citations listed at the end of your paper. They are listed separately from a reference list, bibliography, or works cited. In essence, an endnote functions in the same manner as a parenthetical reference even though it is formatted differently. Both indicate to the reader where the information was taken from. Click here for an example"
    buttons:
    - title: "Okay"
      payload: "Okay"
  utter_foot_ex:
  - text: "A footnote is almost the same as an endnote. Both serve the same function and may have the same format. The primary difference between the two is their location. While endnotes are compiled and displayed near the end of a paper, footnotes appear at the bottom of the same page of text as the quote, paraphrase, or summary to which they refer. Currently, footnotes are used less frequently than parenthetical references and endnotes. Click here for an example. "
    buttons:
    - title: "Okay"
      payload: "Okay"
  utter_def_bib:
  - text: "Whether you are using parenthetical references, endnotes, or footnotes, each must refer to a source listed at the end of your paper. This compilation of sources (sometimes called a bibliography, works cited, or reference list) will be formatted differently depending on the style guide you are using. Click here for example of the Bibliography in APA style"
    buttons:
    - title: "Okay"
      payload: "Okay"  
  utter_cite_why:
  - text: "The citations tell your reader where you found the information you are using. Citing your sources properly is one of the BEST defences against plagiarism. By citing your sources you are acknowledging that the words or ideas are borrowed, not your own."
    buttons:
    - title: "Okay"
      payload: "Okay"
  utter_cite_que:
  - text: "Tell me more about your questions in citation. "
    buttons:
    - title: "Should I cite everything?"
      payload: "Should I cite everything?"
    - title: "Citing sources in a foreign language"
      payload: "Citing sources in a foreign language"
    - title: "What is common knowledge?"
      payload: "What is common knowledge?"      
  utter_cite_com:
  - text: "You must provide a citation for any facts, ideas, or data which you took from another source. The only time you do not need to cite is when the fact or idea is common knowledge"
    buttons:
    - title: "Okay"
      payload: "Okay"
  utter_cite_lang:
  - text: "When you want to quote a source from a language that is different from the language you are writing in, you have the choice of presenting your own translation of the quotation (without the foreign language) or both the original passage in the foreign language and your translation."
    buttons:
    - title: "Okay"
      payload: "Okay"
  utter_def_com:
  - text: "The term, common knowledge, refers to facts or ideas which are widely known or widely agreed upon. For example: Ottawa is the capital of Canada, Pierre Elliott Trudeau died on September 28, 2000. Because the above facts are widely known, you do not have to cite the source where you found them. "
    buttons:
    - title: "Okay"
      payload: "Okay"      
  utter_teach_cite:
  - text: "So far, I can only provide limited help in APA style citation. "
    buttons:
    - title: "Okay"
      payload: "Okay"
  utter_what_source:
  - text: "What kind of source will you be citing?"
    buttons:
    - title: "book"
      payload: "book"
    - title: "journal article"
      payload: "journal article"
  utter_book_author:
  - text: "Is the book you are citing written by a person or organization?"
    buttons:
    - title: "a person"
      payload: "a person"
    - title: "organization"
      payload: "organization"     
  utter_book_type:
  - text: "Is the book eletronic or physical?"
    buttons:
    - title: "eletronic"
      payload: "eletronic"
    - title: "physical"
      payload: "physical" 
  utter_book_ex1:
  - text: "Here's the example (person & eletronic)Monro, V. (1835). A summer ramble in Syria: With a Tartar trip from Aleppo toStamboul (Vol. 1). Retrieved from http://books.google.com/books"
    buttons:
    - title: "Okay"
      payload: "Okay"  
  utter_book_ex2:
  - text: "Here's the example (person & physical) Walker, L.E. (2000). The battered woman syndrome (2nd ed.). New York: Springer"
    buttons:
    - title: "Okay"
      payload: "Okay"  
  utter_book_ex3:
  - text: "Here's the example (org & ele): National Council of Welfare (Canada). (2001). Child poverty profile, 1998.  Retrieved from http://books.google.com/books"
    buttons:
    - title: "Okay"
      payload: "Okay"  
  utter_book_ex4:
  - text: "Here's the example (org & phy): National Fire Protection Association. (2009). Fundamentals of fire fighting skills (2nd ed.). Sudbury, MA: Jones and Bartlett."
    buttons:
    - title: "Okay"
      payload: "Okay"  
  utter_art_type:
  - text: "Is the journal article print or eletronic"
    - title: "eletronic"
      payload: "eletronic"
    - title: "physical"
      payload: "physical"   
  utter_art_ex1:
  - text: "Here's the example: Louth, S. M., Hare, R. D., & Linden, W. (1998). Psychopathy and alexithymia in female offenders. Canadian Journal of Behavioural Science, 30(2), 91-98."
    buttons:
    - title: "Okay"
      payload: "Okay"        
  utter_art_ex2:
  - text: "Here's the example: Ledger, W., Wiebinga, C., Anderson, P., Irwin, D., Holman, A., & Lloyd, A. (2009). Costs and outcomes associated with IVF using recombinant FSH. Reproductive BioMedicine Online, 19(3), 337-342. Retrieved from http://www.rbmonline.com/"
    buttons:
    - title: "Okay"
      payload: "Okay"
  utter_art_ex3:
  - text: "Do you need to learn more about how to cite?"
    buttons:
    - title: "Okay"
      payload: "Okay"
    - title: "No"
      payload: "No"         
  utter_link_ex:
  - text: "Here's the link to SFU Guidelines. https://www.lib.sfu.ca/help/cite-write/citation-style-guides"
    buttons:
    - title: "Okay"
      payload: "Okay"   
  utter_intro_writing:
  - text: "You should develop good note-taking skills to help prevent plagiarism. You should also understand how to quote from your original source, how to paraphrase, and how not to patchwrite. If you want to ask or pay someone to help you with the paper, make sure you're not committing collusion or contract cheating."
    buttons:
    - title: "Okay"
      payload: "Okay" 
  utter_help_writing:
  - text: "Tell me how I can help you with respect to writing and citing"
    buttons:
    - title: "quotation"
      payload: "quotation"
    - title: "paraphrasing"
      payload: "paraphrasing"    
    - title: "patchwriting"
      payload: "patchwriting"
    - title: "citing your own work"
      payload: "citing your own work"   
  utter_intro_quo:
  - text: "You copy a paragraph directly from an article you found. You cite the source, but you forget to use quotation marks. This is plagarism. Click okay to continue"
    buttons:
    - title: "Okay"
      payload: "Okay"         
  utter_intro_quo1:
  - text: "When you quote the exact words of the original source in your essay, you must a. cite the source and use quotation marks b. or use indenting for longer passages. Consult the style guide you are using for further instructions. Do you need an example?"
    buttons:
    - title: "Okay"
      payload: "Okay"
    - title: "No"
      payload: "No"
  utter_quo_ex:
  - text: "Here's an example. One study found that QQ the listener's familiarity with the topic of discourse greatly facilitates the interpretation of the entire message QQ (Gass & Varonis, 1984, p. 85)."
    buttons:
    - title: "Okay"
      payload: "Okay"     
  utter_intro_para:
  - text: "You find a neat idea in an article, so you use it in your paper. You don’t bother to cite the source of the idea, because you’ve expressed it in your own words. This is plagarism. Click okay to continue"
    buttons:
    - title: "Okay"
      payload: "Okay"         
  utter_intro_para1:
  - text: "When writing a paper, you should not have too many quotations. It is much more common that you would paraphrase information from your sources. Paraphrasing means expressing an author’s ideas in your own words, through changing both the language and the sentence structure. (A related technique is summarizing. Summarizing also involves putting the author’s ideas into your own words, but summaries omit much of the detail.) Paraphrasing is not easy. In particular, it is impossible to paraphrase something you do not really understand. If you don't understand it, you will be overly dependent on the original words of your source. This can be a challenge for anyone studying a new subject or working in a second language. Click okay for an example. "
    buttons:
    - title: "Okay"
      payload: "Okay"
    - title: "No"
      payload: "No"      
  utter_para_ex:
  - text: "Here's an example of original and paraphrased sentences. Original: Giraffes like Acacia leaves and hay and they can consume 75 pounds of food a day. Paraphrase: A giraffe can eat up to 75 pounds of Acacia leaves and hay everyday (Liu, 2011)."
    buttons:
    - title: "Okay"
      payload: "Okay"   
  utter_intro_pat:
  - text: "Patchwriting occurs when a student paraphrases a passage but leaves it too similar to the original. In patchwriting, the writer may delete a few words, change the order, substitute synonyms and even change the grammatical structure, but the reliance on the original text is still visible when the two are compared. Click okay for an example. "
    buttons:
    - title: "Okay"
      payload: "Okay"
    - title: "No"
      payload: "No"  
  utter_pat_ex:
  - text: "Here's example. A link"
    buttons:
    - title: "Okay"
      payload: "Okay"         
  utter_intro_cite_own:
  - text: "You use part or all of a previously completed essay in a new assignment. You do not acknowledge that you are borrowing from your own previous work. This is plagarism. Click okay to continue"
    buttons:
    - title: "Okay"
      payload: "Okay" 
  utter_intro_cite_own1:
  - text: "QQ Like all plagiarism the essence of self-plagiarism is the author attempts to deceive the reader. This happens when no indication is given that the work is being recycled or when an effort is made to disguise the original text....QQ (Hexam, 2005, emphasis added) While it is often acceptable - and encouraged - to build on in-class work, notes, and ideas as you write papers on similar topics throughout your academic career, it is vital that you provide a clear path back to the original use of these ideas, just as with citing the work of others. Do you need an example?"
    buttons:
    - title: "Okay"
      payload: "Okay"
    - title: "No"
      payload: "No"  
  utter_cite_own_ex:
  - text: "Marie Briggs is a student at Walden University. She wrote a paper last term on personality theory, and she wants to use some of her work in that paper in another paper this term. Since she is citing previously completed work - even though it is her own - she needs to cite it just as she would someone else's work. Here is what her in-text citaiton might look like Briggs (2012) asserted that previous literature on the psychology of tightrope walkers was faulty in that it QQ presumed that risk-taking behaviors align neatly with certain personality traits or disorders QQ (p. 4). Her reference list would also include this paper: Briggs, M. (2012). An analysis of personality theory. Unpublished manuscript, Walden University."
    buttons:
    - title: "Okay"
      payload: "Okay"

stories.md:

## general path (citation)
* greet
  - utter_type_of_help
* citation
  - utter_cite_intro

## general path (writing to cite)
* greet
  - utter_type_of_help
* writing
  - utter_intro_writing

## citation path citing style
* citation
  - utter_cite_intro
* confirm
  - utter_cite_help
* style_citation
  - utter_cite_style

## citing style MLA
* style_citation
  - utter_cite_style
* mla
  - utter_cite_MLA

## citating style APA
* style_citation
  - utter_cite_style
* apa
  - utter_cite_APA

## citing style chicago
* style_citation
  - utter_cite_style
* chi
  - utter_cite_chi

## citation path how citing works
* citation
  - utter_cite_intro
* confirm
  - utter_cite_help
* citing_works
  - utter_loc_cite

## how citing works - parenthesis - yes path
* citing_works
  - utter_loc_cite
* confirm
  - utter_how_cite_work
* pare_ref
  - utter_pare
* confirm
  - utter_pare_ex

## how citing works - parenthesis - yes path
* citing_works
  - utter_loc_cite
* confirm
  - utter_how_cite_work
* pare_ref
  - utter_pare
* deny
  - utter_other_help

## how citing works - endnotes
* citing_works
  - utter_loc_cite
* confirm
  - utter_how_cite_work
* endnotes
  - utter_end_ex

## how citing works - footnotes
* citing_works
  - utter_loc_cite
* confirm
  - utter_how_cite_work
* footnotes
  - utter_foot_ex

## citation path bibliography
* citation
  - utter_cite_intro
* confirm
  - utter_cite_help
* bib
  - utter_def_bib
* confirm
  - utter_other_help

## citation why should we cite
* citation
  - utter_cite_intro
* confirm
  - utter_cite_help
* why_cite
  - utter_cite_why
* confirm
  - utter_other_help

## citation why should we cite - should i cite everything
* why_cite
  - utter_cite_why
* confirm
  - utter_cite_que
* cite_every
  - utter_cite_com
* confirm
  - utter_other_help

## citation why should we cite - foreign language
* why_cite
  - utter_cite_why
* confirm
  - utter_cite_que
* cite_lang
  - utter_cite_lang
* confirm
  - utter_other_help

## citation why should we cite - common knowledge
* why_cite
  - utter_cite_why
* confirm
  - utter_cite_que
* com_know
  - utter_def_com  
* confirm
  - utter_other_help
  
## citation teach me how to cite
* citation
  - utter_cite_intro
* confirm
  - utter_cite_help
* teach_cite
  - utter_teach_cite
* confirm
  - utter_what_source

## teach me how to cite - book
* teach_cite
  - utter_teach_cite
* confirm
  - utter_what_source
* cite_book
  - utter_book_author
* person
  - utter_book_type
* eletronic
  - utter_book_ex1
* confirm
  - utter_other_help

## teach me how to cite - book
* teach_cite
  - utter_teach_cite
* confirm
  - utter_what_source
* cite_book
  - utter_book_author
* person
  - utter_book_type
* physical
  - utter_book_ex2
* confirm
  - utter_other_help

## teach me how to cite - book
* teach_cite
  - utter_teach_cite
* confirm
  - utter_what_source
* cite_book
  - utter_book_author
* org
  - utter_book_type
* eletronic
  - utter_book_ex3
* confirm
  - utter_other_help

## teach me how to cite - book
* teach_cite
  - utter_teach_cite
* confirm
  - utter_what_source
* cite_book
  - utter_book_author
* org
  - utter_book_type
* physical
  - utter_book_ex4
* confirm
  - utter_other_help

## teach me how to cite - journal
* teach_cite
  - utter_teach_cite
* confirm
  - utter_what_source
* cite_art
  - utter_art_type
* eletronic
  - utter_art_ex2
* confirm
  - utter_other_help

## teach me how to cite - journal
* teach_cite
  - utter_teach_cite
* confirm
  - utter_what_source
* cite_art
  - utter_art_type
* physical
  - utter_art_ex1
* confirm
  - utter_other_help

I fixed by using http://www.yamllint.com/ to debug.

2 Likes