docx2pf on macOS error
Hi,
I can't convert docx to pdf on macOS. Everytime I'm receiving error: 'result': 'error', 'error': 'Error: Message not understood.'} An exception has occurred, use %tb to see the full traceback. anaconda3/lib/python3.8/site-packages/docx2pdf/init.py", line 72, in macos sys.exit(1) Library is working perfectly on windows 11 anaconda IDE. Could you help me with solving the issue?
Do You have windows installed on your Mac? I need to install the free trial for testing
Can confirm the issue, I used icloud to safe/get the word documents from. Moving from icloud to local storage fixed the issue for me.
I'm running into this with:
- macOS 12.6 (M1 macbook)
- Python 3.9.13
- docx2pdf 0.1.8 (installed via
pip install docx2pdf) - Word 16.67 (22111300)
My files are in a local directory, not in iCloud or anything.
from docx2pdf import convert
convert('example.docx', 'example.pdf')
# 0%| | 0/1 [00:00<?, ?it/s]
# {'input': '$HOME/example.docx', 'output': '$HOME/example.pdf', 'result': 'error', 'error': 'Error: Message not understood.'}
# 0%| | 0/1 [00:02<?, ?it/s]
- Word opens
- On the first attempt, I had to grant it permission to access that file
- On subsequent attempts, the "home" modal open (with template documents etc.)
- I see the error message above, and my python repl
exits - Word remains open, with the
.docxopen
Having debugged it a bit further, I suspect my issue is that I don't have an Office365 subscription on my macbook, so I'm unable to save or edit Word docs!

My docx's are simple enough that LibreOffice seems to work, thanks to this SO:
soffice --headless --convert-to pdf:writer_pdf_Export --outdir out/ input.docx