0
打开Word文档时,当试图打开一个.dot
文件,python-docx
,我得到的错误:型无关系与Python
KeyError: "no relationship of type 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument' in collection"
这是有问题的代码:
from docx import Document
document = Document('file.dot')
这里的实际问题是什么?
我加在回答OPC-诊断链接。这是一个用于探索和诊断Microsoft Office Open XML文件问题的小工具。 –
你可以给我们一个坏文件的链接吗? –
我添加了一个修复的想法,你可以测试它吗? –