scanny / python-pptx

Create Open XML PowerPoint documents in Python
MIT License
2.4k stars 520 forks source link

Powerpoint Repair Error #862

Closed EmilyPaltz closed 1 year ago

EmilyPaltz commented 1 year ago

I have a script that uses python-pptx to create an automated powerpoint. Recently, when the PowerPoint is automatically created I receive an error when I try to open the PowerPoint that says "PowerPoint found a problem with content in [filename]. PowerPoint can attempt to repair the presentation. If you trust the source of this presentation, click Repair." I repair the PowerPoint. Then, when I open it I find that not only are images are removed, but some are very distorted. I know it is not the image itself because I also save the images separately, and they are fine. If I run the script manually, instead of automatically, I do not receive this error. Ideas on what might be the problem?

EmilyPaltz commented 1 year ago

Need to add "sleep" time after attempting to add an image.