python-pptx
python-pptx copied to clipboard
AttributeError: 'Slides' object has no attribute 'slides'
Hi!
I've just started having an issue with the library when it comes to just accessing slides.
textbox = pres.slides[0].shapes.add_textbox(Cm(0), Cm(0), Cm(19.25), Cm(5.5))
It has been working perfectly fine, yet all of sudden starts returning an error:
textbox = pres.slides[0].shapes.add_textbox(Cm(0), Cm(0), Cm(19.25), Cm(5.5)) AttributeError: 'Slides' object has no attribute 'slides'
The presentation is instantiated with multiple slides as this point and has been working well in the past, the error just randomly arose. Thanks a lot!
I suspect pres is not your Presentation object but a Slides object.