question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ruamel.yaml.scanner.ScannerError: while scanning a simple key in "<unicode string>", line 7, column 3 could not find expected ':' in "<unicode string>", line 8, column 3

See original GitHub issue

Rasa Core version:0.12.3

Python version: Python 3.6.8

Operating system (windows, osx, …):Ubuntu 16.04

Issue: python -m rasa_core.run -d models/dialogue -u models/nlu/default/current --endpoints endpoints.yml --debug --enable_api 2019-02-20 10:58:16 INFO root - Rasa process starting Traceback (most recent call last): File “/home/arghya/anaconda3/envs/myenv/lib/python3.6/runpy.py”, line 193, in _run_module_as_main “main”, mod_spec) File “/home/arghya/anaconda3/envs/myenv/lib/python3.6/runpy.py”, line 85, in _run_code exec(code, run_globals) File “/home/arghya/anaconda3/envs/myenv/lib/python3.6/site-packages/rasa_core/run.py”, line 244, in <module> _endpoints = AvailableEndpoints.read_endpoints(cmdline_args.endpoints) File “/home/arghya/anaconda3/envs/myenv/lib/python3.6/site-packages/rasa_core/utils.py”, line 660, in read_endpoints endpoint_file, endpoint_type=“nlg”) File “/home/arghya/anaconda3/envs/myenv/lib/python3.6/site-packages/rasa_core/utils.py”, line 598, in read_endpoint_config content = read_yaml_file(filename) File “/home/arghya/anaconda3/envs/myenv/lib/python3.6/site-packages/rasa_core/utils.py”, line 368, in read_yaml_file return read_yaml_string(read_file(filename)) File “/home/arghya/anaconda3/envs/myenv/lib/python3.6/site-packages/rasa_core/utils.py”, line 385, in read_yaml_string return yaml_parser.load(string) File “/home/arghya/anaconda3/envs/myenv/lib/python3.6/site-packages/ruamel/yaml/main.py”, line 331, in load return constructor.get_single_data() File “/home/arghya/anaconda3/envs/myenv/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 891, in _ruamel_yaml.CParser._compose_mapping_node File “_ruamel_yaml.pyx”, line 904, in _ruamel_yaml.CParser._parse_next_event ruamel.yaml.scanner.ScannerError: while scanning a simple key in “<unicode string>”, line 7, column 3 could not find expected ‘:’ in “<unicode string>”, line 8, column 3

As per http://www.yamllint.com/, the domain file is valid.

Content of domain file (if used & relevant):

%YAML 1.1

actions:

  • utter_CEO_info
  • utter_happy
  • action_get_model_config
  • action_save_city_name
  • utter_Service_Center_OR_Factory
  • utter_Oppo_shop_location
  • action_slot_reset
  • utter_CustomerCare_info
  • utter_greet
  • utter_about_OPPO
  • utter_goodbye
  • utter_brand_info
  • utter_unclear
  • utter_Official_Website
  • utter_more_info
  • utter_model_name_lookout
  • utter_check_another_one
  • action_get_service_centre_location
  • utter_did_that_help
  • utter_mood_affirm
  • action_save_model_name
  • utter_OPPO_Phones_Price
  • utter_city_name
  • utter_mood_deny
  • action_get_shop_location
  • utter_provide_founder
  • utter_customer_location_confirm
  • utter_thanks
  • utter_deny
  • action_restarted
  • utter_model_name_confirm
  • action_get_model_price entities:
  • model
  • PERSON
  • information
  • shop_location
  • customer_location
  • workshop_location
  • feature

intents:

  • mood_affirm
  • greet
  • Service_Center_OR_Factory
  • city_name
  • goodbye
  • provide_founder
  • about_OPPO
  • brand_info
  • CustomerCare_info
  • Oppo_store_location
  • CEO_info
  • Official_Website
  • OPPO_Phones_Price
  • model_name_lookout
  • mood_deny

slots: PERSON: type: text customer_location: type: text model: type: text shop_location: type: text workshop_location: type: text battery: type: text camera: type: text processor: type: text display: type: text operating_system: type: text price: type: text

templates: utter_CEO_info:

  • text: CEO of Oppo is Chen Mingyong.Started his position from 2/11/2017.

utter_CustomerCare_info:

  • text: Oppo’s customer care number is 1800 103 2777

utter_Official_Website:

  • text: ‘Official website is: www.oppo.in’

utter_about_OPPO:

  • text: Oppo Electronics Corporation, commonly referred to as Oppo, is a Chinese consumer electronics and mobile communication company, known for its smartphones, Blu-ray players and other electronic devices. A leading manufacturer of smartphones, Oppo was the top smartphone brand in China in 2016 and was ranked No. 8 worldwide

utter_brand_info:

  • text: I work for Oppo Mobile

utter_check_another_one:

  • text: Do you want to make another inquiry?

utter_city_name:

  • text: Which city are you from?
  • text: Which city are you from?
  • text: Name of the city please?

utter_customer_location_confirm:

  • text: ‘I will be making inquiry for customer_location: {customer_location}. Is that correct?’

utter_deny:

  • text: That’s a shame. Let me know if you change your mind.

utter_did_that_help:

  • text: Did that help you?

utter_goodbye:

  • text: Bye and take care!
  • text: Bye

utter_greet:

  • text: Hey!This is Ollie,your assistant.How may I help you?
  • text: Hi!I am here to help.Shoot!
  • text: Hi,how can I help you?

utter_happy:

  • text: Great carry on!

utter_mood_affirm:

  • text: Glad that i was useful.Next Question if any?

utter_mood_deny:

  • text: Try again!

utter_more_info:

  • text: Please provide more details so that i can understand your query

utter_provide_founder:

  • text: Oppo’s founder is Chen Mingyong.

utter_thanks:

  • text: You are very welcome.
  • text: Glad I could help!

utter_unclear:

  • text: I am not sure what you are aiming for.

utter_model_name_lookout:

  • Please give the model name or repeat once again.

utter_model_name_confirm:

  • text: ‘I will be making inquiry for model_name: {model}. Is that correct?’

Content of endpoint.yml … action_endpoint: url: “http://localhost:5055/webhook” tracker_store: store_type: mongod url: mongodb://mongo:27017 db: rasa username:none password:none

#please note that the indentation of the domain file is getting ruined as soon as i am pasting the content in the domain section.I have checked the indentation in http://www.yamllint.com/ and getting valid response.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
erohmensingcommented, Feb 20, 2019

Hi @Arghya999. It’s not your domain.yml that’s getting errored, it’s your endpoint.yml (you’ll notice in the Traceback that the issue is happening in read_endpoint_config). If you put your endpoint.yml through yamllint, you get the same error. The issue seems to be not having spaces after your colons for username and password. This fix should work:

Content of endpoint.yml

action_endpoint:
url: "http://localhost:5055/webhook"
tracker_store:
store_type: mongod
url: mongodb://mongo:27017
db: rasa
username: none
password: none

P.S. For future reference, you can

preserve 
    indentation 

in your code with three ticks (```) above and below the code. This is helpful for legibility of stack traces as well as things like domain files 🙂

0reactions
harshalDharpurecommented, Aug 8, 2022

I am trying to integrate a haystack with rasa in the chatbot, also I followed the haystack documentation. But the error occurred, can you please acknowledge How to solve it Link: https://haystack.deepset.ai/guides/chatbots

Read more comments on GitHub >

github_iconTop Results From Across the Web

ruamel.yaml.scanner.ScannerError: while scanning a ...
ScannerError : while scanning a simple key in "<unicode string>", line 7, column 3 could not find expected ':' in "<unicode string>", line...
Read more >
YAML Parser Error: could not found expected : in <unicode ...
config file syntax which is valid YAML format. It breaks with above error when I put my actual KEY and CERTIFICATE (PEM Format)...
Read more >
Scanner Error Reading Simple Key - Usage & Issues
Hello, I am new to DLC and attempting to create a 3D project on a reaching task for ... line 14, column 1...
Read more >
while scanning a simple key in "<unicode string>"
Hi there, I'm trying to implement an automod code that deletes posts from users that don't have a user flair. I've tried several...
Read more >
YAML: The Missing Battery in Python
In this tutorial, you'll learn all about working with YAML in Python. By the end of it, you'll know about the available libraries, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found