I am new to python & facing issue while accessing second element of iterateable returned by function from lib pyyaml, yaml.load_all, below is code:
import os
import yaml
file = "abc.yaml"
stream = open(file)
docs = yaml.load_all(stream)
print docs[1]
output I am getting is
TypeError: 'NoneType' object has no attribute '__getitem__'
yaml is python lib for handling yaml format, yaml.load_all is explained here
If you only need that one document, then this should do: