Closed jftsang closed 2 years ago
thanks for the issue @jftsang, can you share which OS you're using? the implementations slightly differ.
@AlJohri I am on MacOS.
(venv39) jmft2@aerosol:~$ uname -a
Darwin aerosol.QLOCOM 18.7.0 Darwin Kernel Version 18.7.0: Tue Jun 22 19:37:08 PDT 2021; root:xnu-4903.278.70~1/RELEASE_X86_64 x86_64
Ah - I dug into the file, and, as a separate issue, I noticed that I don't have Microsoft Word on my machine! So I should first address that...
I'm closing this issue but raising a separate one to do with Microsoft Word not being present. The problem is the same, an exception ought to be raised.
Attempt to run
convert()
on a corrupted docx fileconvert('/tmp/empty_file.docx')
or a docx file that doesn't exist:convert('/tmp/this_file_doesnt_exist.docx')
. You just get nothing back: no indication that the conversion has failed. It would be more sensible to throw an exception in this case. As a workaround I have to test whether the expected file exists, but this is not a good test if the target file might already exist and hasn't been updated.