New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no relationship of type ... in collection error #204
Comments
I expect you'll see a difference in the .rels part of the document package. I expect it uses a different URI for the main document relationship. If you dump the .rels part with opc-diag you should be able to see it. If you do that on a regular Word document you get something like this: $ opc browse default.docx .rels
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="x" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>
<Relationship Id="x" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
<Relationship Id="x" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>
<Relationship Id="x" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail" Target="docProps/thumbnail.jpeg"/>
</Relationships> The second relationship item is the one python-docx is looking for to start the "open" process. Apparently there's change in there somewhere when saving as strict OpenXML. |
Thanks @scanny, my bad for using a 'Strict Open XML Document'. Re-generated my input document as a standard 'Word document' .docx and that seems to have fixed the problem. |
Closing as resolved. |
i have same issue , could you have other way using the python-docx to open the docx when saving as the strict open xml ? |
@scanny Hi, is there a way we can open this? |
Hi you guys: try save AS a new file and read it.. |
Hi, I was trying python-docx with a .docx file which I got from a .doc file 'Saved as' a Strict Open XML Document with Microsoft Office Standard 2013. Unfortunately, when I'm trying to open the .docx file with python-docx, I get the error below. Does anybody have any idea what the problem is ?
The text was updated successfully, but these errors were encountered: