3

i installed docx package for python.

from docx import Document

document = Document('inp.docx')

for p in document.paragraphs:
    print(p.text)

when i run the code, it throws the error

Traceback (most recent call last):
  File "cont.py", line 1, in <module>
        from docx import Document
      File "C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\docx.py", line 30, in <module>
        from exceptions import PendingDeprecationWarning
    ModuleNotFoundError: No module named 'exceptions'

please suggest the solution.

vishes_shell
  • 22,409
  • 6
  • 71
  • 81
Bhuvana B N
  • 31
  • 1
  • 3

0 Answers0