Pykwalify: YAML Schema validation error
<p>I am writing a config file in <code>YAML</code> and its corresponding schema in <code>PyKwalify</code>.</p>

<p>when I compile with <code>pykwalify</code>, I get this error</p>

<pre><code>NotMappingError: error code 6: Value: None is not of a mapping type: Path: '/'
</code></pre>

<p>what does this error imply?  </p>

<p>It implies that instead of providing a mapping, which could have the form of a block style:</p>

<pre><code>a: 1
b: 2
</code></pre>

<p>of a flow style:</p>

<pre><code>{a: 1, b: 2}
</code></pre>

<p>you provided the null scalar (<code>null</code>, <code>~</code>) or no scalar:</p>

<pre><code>x: 
</code></pre>

<p>or </p>

<pre><code>x: null
</code></pre>

<p>would load <code>None</code> in Python as value for the key <code>x</code>, whereas</p>

<pre><code>x:
  a: 1
  b: 1
</code></pre>

<p>would load a dictionary/mapping as the value for key <code>x</code>. Please note that is you make mistakes with indentation or mix in TAB characters you can get something that looks OK in your editor but doesn't parse as expected.</p>

python yaml