This feels like it should be pretty straightforward but I’m out of ideas.
I’m trying to run what I feel like is a fairly simple script to take a folder of markdown files with text and convert then into a single running .docx file. For some reason I keep getting the same error issue no matter what I do.
Traceback (most recent call last):
File "c:PATHmarkdown_conversion.py", line 52, in <module>
append_docx_to_existing(existing_docx, docx_file)
File "c:PATHmarkdown_conversion.py", line 25, in append_docx_to_existing
doc = Document(existing_file)
^^^^^^^^^^^^^^^^^^^^^^^
File "c:PATH.condaenvsAnnLettersLibsite-packagesdocxapi.py", line 27, in Document
document_part = cast("DocumentPart", Package.open(docx).main_document_part)
^^^^^^^^^^^^^^^^^^
File "c:PATH.condaenvsAnnLettersLibsite-packagesdocxopcpackage.py", line 127, in open
pkg_reader = PackageReader.from_file(pkg_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:PATH.condaenvsAnnLettersLibsite-packagesdocxopcpkgreader.py", line 22, in from_file
phys_reader = PhysPkgReader(pkg_file)
^^^^^^^^^^^^^^^^^^^^^^^
File "c:PATH.condaenvsAnnLettersLibsite-packagesdocxopcphys_pkg.py", line 21, in __new__
raise PackageNotFoundError("Package not found at '%s'" % pkg_file)
docx.opc.exceptions.PackageNotFoundError: Package not found at 'c:/PATH/comp_letters.docx'
I have verified the correct path, tried creating new files and restarted multiple times. This feels like it should not be too complicated.