attributeerror 3a module 27yaml 27 has no attribute 27load all 27

Solutions on MaxInterview for attributeerror 3a module 27yaml 27 has no attribute 27load all 27 by the best coders in the world

showing results for - "attributeerror 3a module 27yaml 27 has no attribute 27load all 27"
Jacopo
15 Aug 2020
1# pip install pyyaml
2
3import yaml
4
5with open('data.yaml') as f:
6    docs = yaml.load_all(f, Loader=yaml.FullLoader)
7    for doc in docs:
8        for k, v in doc.items():
9            print(k, "->", v)
Emma
04 Oct 2019
1# Issue - AttributeError: module 'yaml' has no attribute 'load_all'
2One possible reason, you may have accidentally created a yaml.py file or yaml.py file exists there already. In such scenario, it won't be referring to python library for yaml.