docttotxt error

This commit is contained in:
sanj 2010-04-09 00:50:23 +05:30
parent a7018a1039
commit fb0bff0fc4

View File

@ -86,7 +86,7 @@ def docToTxt(**kwargs):
txtPath = obj.txtPath() txtPath = obj.txtPath()
if not os.path.isfile(txtPath): if not os.path.isfile(txtPath):
os.system("antiword -f -m 'UTF-8' '%s' > %s" % (docFilePath, txtPath,)) os.system("antiword -f -m 'UTF-8' '%s' > %s" % (docFilePath, txtPath,))
f = codecs.open("/tmp/tmpDocToTxt.txt", encoding='utf-8') f = codecs.open(txtPath, encoding='utf-8')
txt = f.read() txt = f.read()
f.close() f.close()
obj.doc_txt = txt obj.doc_txt = txt