Skip to content

JPEG image not handled. #1430

Open
Open
@jnafzig

Description

@jnafzig

error2
The above image can't be added to a document despite being an apparently valid jpeg.

from docx import Document

doc = Document(None)
with open('error.jpg', 'rb') as f:
    doc.add_picture(f)

This raises docx.image.exceptions.UnrecognizedImageError. Apparently it doesn't match any existing header format listed in SIGNATURES.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions