Skip to content

Open Word docx file with "The image part with relationship rID8 was not found" error, it always fails #1105

Open
@paradise321

Description

@paradise321

When I try to open a docx file with "The image part with relationship rID8 was not found" error, the following error is reported always.

The code is as simple as following:


from docx import Document

doc = Document('.\WordHasSomeProblem.docx')

WordHasSomeProblem.docx

The problematic word file is attached, i.e., WordHasSomeProblem.docx

As Microsoft has declared here: https://docs.microsoft.com/en-us/office/troubleshoot/word/image-part-relationship-rld8-not-found-error-microsoft-word, the problem happens here is because of some target field was set to "NULL.".

My question is: is that possible to add some parameter in Document() to just ignore this kind of errors and continue loading the docx into RAM?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions