psycopg.DataError: PostgreSQL text fields cannot contain NUL (0x00) bytes #751
Labels
bug
Something isn't working
contributions wanted!
Looking for external contributions
integration:pgvector
Describe the bug
Running a simple embedding/indexing pipeline based on the pgvector integration (example).
Having no problem when running
markdown
files, when running the pipeline throughpdf
files, I get the following error on some pdfs:psycopg.DataError: PostgreSQL text fields cannot contain NUL (0x00) bytes
.I wonder whether you all have come across this before and whether this might be a common case to solve for in
document_writer
.I added a patch to that file to replace null bytes before attempting to write to
pg vector
Error message
psycopg.DataError: PostgreSQL text fields cannot contain NUL (0x00) bytes
.Expected behavior
Would expect the pipeline to write valid content to the db, and perhaps ignore null bytes.
Additional context
The PDF includes images, tables, etc. This is the type of PDF I will likely be ingesting, as opposed to a super clean and simple one. The PDF is 28MB.
To Reproduce
FAQ Check
System:
The text was updated successfully, but these errors were encountered: