I think that there is a bug in your docx2ctx.py. It works for files which do not have embedded pngs in them. But for files which do: Traceback (most recent call last): File "/home/dmr104/Downloads/context-tools/docx2ctx/docx2ctx.py", line 872, in <module> process_doc(Path(doc), copy.copy(args)) File "/home/dmr104/Downloads/context-tools/docx2ctx/docx2ctx.py", line 673, in process_doc result = obj.process() ^^^^^^^^^^^^^ File "/home/dmr104/Downloads/context-tools/docx2ctx/docx2ctx.py", line 515, in process dst_fname = self.options['imagedir'] / pname.name ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ TypeError: unsupported operand type(s) for /: 'str' and 'str' 2024-10-12 23:21:10,979 DEBUG a_graphic ['xmlns:a'] 2024-10-12 23:21:10,979 DEBUG pic_cNvPr ['id', 'name'] 2024-10-12 23:21:10,980 DEBUG a_blip ['r:embed'] 2024-10-12 23:21:10,980 DEBUG image reference found: rId7 = image2.png 2024-10-12 23:21:10,980 DEBUG p ['w14:paraId', 'w14:textId', 'w:rsidR', 'w:rsidRDefault', 'w:rsidP'] 2024-10-12 23:21:10,980 DEBUG pStyle ['w:val'] 2024-10-12 23:21:10,980 DEBUG p ['w14:paraId', 'w14:textId', 'w:rsidR', 'w:rsidRDefault', 'w:rsidP'] 2024-10-12 23:21:10,980 DEBUG pStyle ['w:val'] 2024-10-12 23:21:10,980 DEBUG p ['w14:paraId', 'w14:textId', 'w:rsidR', 'w:rsidRDefault', 'w:rsidP'] 2024-10-12 23:21:10,981 DEBUG pStyle ['w:val'] 2024-10-12 23:21:10,981 DEBUG p ['w14:paraId', 'w14:textId', 'w:rsidR', 'w:rsidRDefault', 'w:rsidP'] 2024-10-12 23:21:10,981 DEBUG pStyle ['w:val'] 2024-10-12 23:21:10,981 DEBUG p ['w14:paraId', 'w14:textId', 'w:rsidR', 'w:rsidRDefault', 'w:rsidP'] 2024-10-12 23:21:10,981 DEBUG pStyle ['w:val'] 2024-10-12 23:21:10,981 DEBUG Not an image file: [Content_Types].xml 2024-10-12 23:21:10,982 DEBUG Not an image file: _rels/.rels 2024-10-12 23:21:10,982 DEBUG Not an image file: word/document.xml 2024-10-12 23:21:10,982 DEBUG Not an image file: word/_rels/document.xml.rels 2024-10-12 23:21:10,982 DEBUG Not an image file: word/footnotes.xml 2024-10-12 23:21:10,982 DEBUG Not an image file: word/endnotes.xml