Hi guys, I want to add a video to the new slideshow. The format of the video is "mp4", but some presentations are fine, but some will report an error 'Part' object has no attribute 'sha1'. Any suggestions very much helpful.
my code is as follow:
prs = Presentation(...)
video = "..."
cover = "..."
slide_layout = prs.slide_layouts[master_index]
slide = prs.slides.add_slide(slide_layout)
slide.shapes.add_movie(video, poster_frame_image=cover, left=Cm(1.59), top=Cm(6.51), width=Cm(20.20), height=Cm(11.02))
Hi guys, I want to add a video to the new slideshow. The format of the video is "mp4", but some presentations are fine, but some will report an error 'Part' object has no attribute 'sha1'. Any suggestions very much helpful.
my code is as follow: prs = Presentation(...) video = "..." cover = "..." slide_layout = prs.slide_layouts[master_index] slide = prs.slides.add_slide(slide_layout) slide.shapes.add_movie(video, poster_frame_image=cover, left=Cm(1.59), top=Cm(6.51), width=Cm(20.20), height=Cm(11.02))