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 ?
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 ?