Error parsing YAML config file: yaml-cpp: error at line 1, column 2: end of map flow not found

The contents of my file are:

dbPath: “/data/db”
bindIp: “,localhost”
port: “27000”
authorization: “enabled”

I have a single space for dbPath, bindIp, port, authorization. I continue to receive that same error message. HELP!

I suspect the quotes.

You may include the content of text file inside pre or code html tag and the spaces will be preserved. This is much helpful to debug stuff like yaml.

I wonder why it’s pointing to line 1, column 2? What is on line 1?
I’m actually suspecting the first line is not “storage” or the use of tabs.
Let’s see a screenshot of your config file.

Hello, thanks for the response. Here’s a screenshot of my file…


I am not using tabs. Only spaces. I used my MacOS TextEdit program. Changed the extension to .config. Still does not work. Then I used Microsoft Word and saved it as a text file. Still did not work.

Try 3 spaces instead of one

I tried with 3 spaces and still get the SAME error. I know it is using that file because when I change the file name it throws a different error. I’m baffled as to why I can’t get this to work. Am I using the wrong text editor?

It is funny. In the first message you have quotes yet in the screen shot you do not have any. When I wrote that I suspect the quotes, I was not clear enough. I think you need quotes but the correct one. It looks like the original had the funny quotes.

Re what @steevej-1495 is saying:

Sometimes those quotation marks are based on the language locale so if the above doesn’t work, try using a different text editor like Notepad++.

Notepad++ doesn’t seem to be available for MacOS.

Copy this (").
Or try any other text editor available for Mac.

Hi @Babak_73387,

You don’t really need to use the quotes in this configuration file. But, yeah if in case you are using it then please make sure it’s the "" neutral quotation marks.

You are having issues here because of the text editor tool that you are using. You can use Sublime Text for writing your configuration file.

Hope it helps!

If the issue still persists then please feel free to get back to us.

Happy Learning :slight_smile:

Shubham Ranjan
Curriculum Support Engineer

Hello @Shubham_Ranjan, using Sublime Text fixed the problems that I was having. Thanks to everyone for their feedback! :slightly_smiling_face: Thanks! Babak.