Converting .doc to pure text using Python

本秂侑毒 提交于 2019-12-11 02:29:54

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!