scanny / python-pptx

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

AttributeError: module 'collections' has no attribute 'Container' #949

Closed zchunter closed 7 months ago

zchunter commented 7 months ago

I ran into an error when running through the hello world demo for PPTX. It appears that as of Python 3.10, there is an error of AttributeError: module 'collections' has no attribute 'Container' when attempting to run the line from pptx import Presentation

Looking into it, this can be resolved by adding:

import collections
import collections.abc

Sharing in case you want to update the hello world demo!

scanny commented 7 months ago

What version are you running @zchunter? Pretty sure that was fixed a while ago now.

zchunter commented 7 months ago

I'm sorry about that. I realized I had installed it previously when I thought it would be used for a project. I was using 0.6.21. Updating to 0.6.23 resolved the issue.

Zachary Hunter

On Mon, Mar 4, 2024 at 5:54 PM Steve Canny @.***> wrote:

What version are you running @zchunter https://github.com/zchunter? Pretty sure that was fixed a while ago now.

— Reply to this email directly, view it on GitHub https://github.com/scanny/python-pptx/issues/949#issuecomment-1977610300, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEM5FXK7JW4DYYN3BSZFY6LYWT3R5AVCNFSM6AAAAABEGASEB2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZXGYYTAMZQGA . You are receiving this because you were mentioned.Message ID: @.***>

scanny commented 7 months ago

No worries Zach, glad you got it working :)