0

I get the reoccuring AttributeError when trying to import the python-pptx module:

import pptx

AttributeError                            Traceback (most recent call last)
...
----> 8 import pptx.exc as exceptions
...
AttributeError: module 'pptx' has no attribute 'exc'

I am using the JupyterNotebook and have already reinstalled python-pptx using pip uninstall python-pptx pip install python-pptx. On stackoverflow, I found a related post here.

Even as I understand that it might not be loading the right module, I do not know how to proceed further in order to resolve the issue. Help is very much appreciated.

1 Answer 1

1

Did you name your program pptx.py by any chance? Python would preferentially load that module instead of the library version.

You can find out what module was loaded with this at the Python prompt:

>>> import pptx
>>> pptx.__file__
'/somedir/.../python-pptx/pptx/__init__.pyc'

That may help narrow things down.

Sign up to request clarification or add additional context in comments.

1 Comment

I have tried it and the module is loading correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.