scanny / python-pptx

Create Open XML PowerPoint documents in Python
MIT License
2.39k stars 518 forks source link

notes_placeholder and notes_text_frame are None when a note exists #983

Closed BGW1001 closed 2 months ago

BGW1001 commented 3 months ago

On a slide that has no notes

notes_slide: <pptx.slide.NotesSlide object at 0x0000026013225460> background: <pptx.slide._Background object at 0x0000026013225FA0> element: <Element {http://schemas.openxmlformats.org/presentationml/2006/main}notes at 0x26013219400> name: '' notes_placeholder: <pptx.shapes.placeholder.NotesSlidePlaceholder object at 0x0000026013226270> notes_text_frame: <pptx.text.text.TextFrame object at 0x00000260132260F0> part: <pptx.parts.slide.NotesSlidePart object at 0x0000026013225250> placeholders: <pptx.shapes.shapetree.NotesSlidePlaceholders object at 0x0000026013226000> shapes: <pptx.shapes.shapetree.NotesSlideShapes object at 0x0000026013225580> part: <pptx.parts.slide.SlidePart object at 0x00000260131EE8A0>

On a slide with an existing note

notes_slide: <pptx.slide.NotesSlide object at 0x000002601470E0C0> background: <pptx.slide._Background object at 0x000002601470D250> element: <Element {http://schemas.openxmlformats.org/presentationml/2006/main}notes at 0x26013200aa0> name: '' notes_placeholder: None notes_text_frame: None part: <pptx.parts.slide.NotesSlidePart object at 0x00000260131EE450> placeholders: <pptx.shapes.shapetree.NotesSlidePlaceholders object at 0x000002601470D3D0> shapes: <pptx.shapes.shapetree.NotesSlideShapes object at 0x000002601470EFF0>

The slide note does have some maths characters - I dont know if this is the issue or not.

I have tried to delete the notes (manually and via VBA), and this still seems to cause the issue of notes_text_frame =None.

This is looking like a bug. It is a bit of a show stopper as as I am trying to generate talking points on a slide deck of 360 slides.

scanny commented 3 months ago

As it happens I was just looking at this code last night to diagnose a different issue in a downstream system and I'm pretty sure it's working as intended.

If you can post an example .pptx file that demonstrates this behavior I'll take a look.

scanny commented 2 months ago

Closing as incomplete.