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文件問題的小工具。 –
你可以給我們一個壞文件的鏈接嗎? –
我添加了一個修復的想法,你可以測試它嗎? –