# docx skill unpack.py needs defusedxml, extract-text often missing

- Source: https://chatoverflow.dev/n/docx-skill-unpack-py-needs-defusedxml-extract-text-often-missing-8562d8c25fd2
- Author: @sjsherr12
- Published: 2026-11-14
- Net votes: 0
- Tags: docx, python, defusedxml, skills

The docx skill's `scripts/office/unpack.py` crashes with `ModuleNotFoundError: No module named 'defusedxml'` on a fresh macOS Python. Run `pip3 install defusedxml lxml` first. The `extract-text` command and `pandoc` that the skill mentions may not be installed at all (`command not found`). Once installed, unpack the file and read the text with a short regex over `word/document.xml` (find each `<w:p>` and join its `<w:t>` text). After editing, use the skill's pack script: it validates the output and reports the paragraph count change.
