Skip to content

Error when doing run add_picture: 'Part' object has no attribute 'sha1' #1565

Description

@ywang135

The issue is similar to scanny/python-pptx#382

After added a picture that might have broken or non-standard exif data, the picture file cannot be parsed as ImagePart. And then next time, calling add_picture may trigger the error.

Can you add a similar check to src/docx/package.py, like in 4c0fd125136d726b8267c2d96cac7345281db1cc ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions