问题
I am trying to use textract to convert my .doc files to pure text.
import textract
text = textract.process('path/to/file.extension')
But I am getting this error
AttributeError: 'module' object has no attribute 'process'
回答1:
Make sure that the Python file you are trying to run is not named textract.py.
If that's the name, you will get the error:
AttributeError: 'module' object has no attribute 'process'
来源:https://stackoverflow.com/questions/44916890/converting-doc-to-pure-text-using-python