Forums

docx.opc.exceptions.PackageNotFoundError

docx file is exist. On my localhost my code working, but on pythonanywhere i have docx.opc.exceptions.PackageNotFoundError Package not found at 'text.docx'

Have you installed the package that provides the 'text.docx' module?

i installed pip install python-docx

Is text.docx supposed to be the file that you're trying to load using python-docx?

Yes, this file located in static folder

Looks like the relative path to the file you provide is pointing to the wrong location. Maybe add some logging to see what absolute path it resolves to.

pls. ignore