title: What does 'yaml.parser.ParserError: expected '<document start>', but found '<block mapping start>'' mean?
body: <p>I have the following YAML file:</p>
  
  <pre><code>[mysqld]
  user: "mysql"
  pid-file: /var/run/mysqld/mysqld.pid
  skip-external-locking
  old_passwords: 1
  skip-bdb
  skip-innodb
  create_key: yes
  needs_agent: no
  knows_oop: True
  likes_emacs: TRUE
  women:
      - Mary Smith
      - Susan Williams
  </code></pre>
  
  <p>and the following Python code:</p>
  
  <pre><code>#!/usr/bin/env python
  
  import yaml
  
  
  with open("config.yml") as f:
      sample_config = f.read()
  
  print(yaml.load(sample_config))
  </code></pre>
  
  <p>But it gives me:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/home/moose/Desktop/bla.py", line 9, in &lt;module&gt;
      print(yaml.load(sample_config))
    File "/usr/local/lib/python2.7/dist-packages/yaml/__init__.py", line 71, in load
      return loader.get_single_data()
    File "/usr/local/lib/python2.7/dist-packages/yaml/constructor.py", line 37, in get_single_data
      node = self.get_single_node()
    File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 39, in get_single_node
      if not self.check_event(StreamEndEvent):
    File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 98, in check_event
  [Finished in 0.1s with exit code 1]
  [shell_cmd: python -u "/home/moose/Desktop/bla.py"]
  [dir: /home/moose/Desktop]
  [path: /usr/local/texlive/2013/bin/x86_64-linux:/home/moose/google-cloud-sdk/bin:/home/moose/Downloads/google_appengine:/usr/local/texlive/2013/bin/x86_64-linux:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games]    self.current_event = self.state()
    File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 174, in parse_document_start
      self.peek_token().start_mark)
  yaml.parser.ParserError: expected '&lt;document start&gt;', but found '&lt;block mapping start&gt;'
    in "&lt;string&gt;", line 2, column 1:
      user: "mysql"
  </code></pre>
  
  <p>I have no idea what</p>
  
  <pre><code>expected '&lt;document start&gt;', but found '&lt;block mapping start&gt;'
  </code></pre>
  
  <p>means and how to fix it. What is <code>&lt;document start&gt;</code> and what is a <code>&lt;block mapping start&gt;</code>?</p>