Hi pablocastro
I have run the demo successfully with the sample files. However, when I use my own data (PDF) it fails with below error, wondering if these PDF files need to be generated with specific instructions? Appreciate your response.
Processing './data/az-rhel-pcs.pdf'
Traceback (most recent call last):
File "/workspaces/azure-search-openai-demo/./scripts/prepdocs.py", line 312, in <module>
upload_blobs(filename)
File "/workspaces/azure-search-openai-demo/./scripts/prepdocs.py", line 70, in upload_blobs
reader = PdfReader(filename)
File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.9/site-packages/pypdf/_reader.py", line 319, in __init__
self.read(stream)
File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.9/site-packages/pypdf/_reader.py", line 1504, in read
self._find_eof_marker(stream)
File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.9/site-packages/pypdf/_reader.py", line 1568, in _find_eof_marker
raise PdfReadError("EOF marker not found")
pypdf.errors.PdfReadError: EOF marker not found
ERROR: failed running post hooks: 'postprovision' hook failed with exit code: '1', Path: './scripts/prepdocs.sh'. : exit status 1
RESOLVED: Loaded pdf data from codespaces directly and it worked.