I saved an empty docx file in my Microsoft Word. When I open it with python-docx and try to add a heading, I get KeyError: "no style with name 'Heading 1'". My code looks like document.add_heading('Visitor Information', level=1).
If I open that empty document, add a heading of the 1st level, then delete it again, and save the document, the code works.