The line from docx import [name of file] is incorrect. It should be from docx import Document for reading.docx files. In Python 3, the unicode function no longer exists. You should directly use strings. That is, textFile.write(unicode(para.text)) should be changed to textFile.write(para.text) .