scanny / python-pptx

Create Open XML PowerPoint documents in Python
MIT License
2.37k stars 513 forks source link

slide.has_notes_slide has disappeared ? #774

Closed alainpannetier closed 2 years ago

alainpannetier commented 2 years ago

Not sure what I'm doing wrong.

Steps to reproduce

  1. Take any pptx
  2. Run this
    Python 3.8.10 (default, Sep 28 2021, 16:10:42) 
    [GCC 9.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from pptx import Presentation
    >>> pres=Presentation("Presentation.pptx")
    >>> pres.slides
    <pptx.parts.presentation._Slides object at 0x7f8d035cd3d0>
    >>> pres.slides[0]
    <pptx.parts.slide.Slide object at 0x7f8d035d34f0>
    >>> pres.slides[0].has_notes_slide
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    AttributeError: 'Slide' object has no attribute 'has_notes_slide'

    I'm pretty sure this used to work. I updated recently.

alainpannetier commented 2 years ago

Sorry.

$ pip3 install --upgrade --force-reinstall --user python-pptx

Solved it. Closing.