I’m building a GPT that opens a .docx template and replaces a set of placeholders marked with {{}} using information extracted from chat attachments, which are saved to /mnt/data.
The Python python-docx code I used always pointed the template to this path:
template_path = "/mnt/data/filename.docx"
And it worked perfectly: it replaced everything and returned a downloaded file that was literally the same template, but with the {{}} placeholders filled in.
However, today I tested the GPT again and it now returns a “package not found” error when trying to load "/mnt/data/filename.docx". The GPT still runs os.listdir, which shows the files attached in the conversation, but then it says it can’t find any filename (the template) in its environment and keeps asking me to upload the template again. That doesn’t make sense, because earlier today it was running normally.
I looked for changelogs and posts on Reddit and on OpenAI, but found nothing. If this is an update, it literally happened just now.
Does anyone know why this is happening?
Exact error ChatGPT returns:
File /opt/pyvenv/lib/python3.11/site-packages/docx/opc/pkgreader.py:22, in PackageReader.from_file(pkg_file)
19 @staticmethod
20 def from_file(pkg_file):
21 """Return a |PackageReader| instance loaded with contents of `pkg_file`."""
---> 22 phys_reader = PhysPkgReader(pkg_file)
23 content_types = _ContentTypeMap.from_xml(phys_reader.content_types_xml)
24 pkg_srels = PackageReader._srels_for(phys_reader, PACKAGE_URI)
File /opt/pyvenv/lib/python3.11/site-packages/docx/opc/phys_pkg.py:21, in PhysPkgReader.__new__(cls, pkg_file)
19 reader_cls = _ZipPkgReader
20 else:
---> 21 raise PackageNotFoundError("Package not found at '%s'" % pkg_file)
22 else: # assume it's a stream and pass it to Zip reader to sort out
23 reader_cls = _ZipPkgReader
PackageNotFoundError: Package not found at '/mnt/data/filename.docx'