giving error on python 3.10.1
muralikodali opened this issue · comments
pptx2md giving following error :
Traceback (most recent call last):
File "/home/murali/.local/lib/python3.10/site-packages/pptx/compat/__init__.py", line 10, in <module>
Container = collections.abc.Container
AttributeError: module 'collections' has no attribute 'abc'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/murali/.local/bin/pptx2md", line 5, in <module>
from pptx2md.__main__ import main
File "/home/murali/.local/lib/python3.10/site-packages/pptx2md/__main__.py", line 1, in <module>
from pptx import Presentation
File "/home/murali/.local/lib/python3.10/site-packages/pptx/__init__.py", line 14, in <module>
from pptx.api import Presentation # noqa
File "/home/murali/.local/lib/python3.10/site-packages/pptx/api.py", line 15, in <module>
from .package import Package
File "/home/murali/.local/lib/python3.10/site-packages/pptx/package.py", line 6, in <module>
from pptx.opc.package import OpcPackage
File "/home/murali/.local/lib/python3.10/site-packages/pptx/opc/package.py", line 11, in <module>
from pptx.compat import is_string, Mapping
File "/home/murali/.local/lib/python3.10/site-packages/pptx/compat/__init__.py", line 14, in <module>
Container = collections.Container
AttributeError: module 'collections' has no attribute 'Container'
Hi, this error is from dependent package python-pptx and there is a similar issue: scanny/python-pptx#750, which turns out to be a folder called "collections" in the same place where the command is called. Seems not a compatibility issue about python 3.10.
Hi, applying the "monkey patch" from scanny did the job.
In /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pptx/compat/init.py
add import collections.abc
after the line import collections
My fault. This is indeed a compatibility issue of python-pptx with python 3.10. I'll update the package when this was fixed in python-pptx, at this time you should downgrade to python3.9 or patch it like above.
I do not suppose there is an update on this issue. 😅
Getting the same error as muralikodali.
Thanks to @MaxAFriedrich this issue was solved. see #36 .
try install the new version 1.3.0