PineconeVectorStores.add_texts returns an error: unsupported operand type(s) for +: 'int' and 'NoneType'

I have the following code.

vec = PineconeVectorStore(index_name=index_name,embedding=embeddings)
vec.add_documents(pages)

The second line in the above block fails with the error shown below.
unsupported operand type(s) for +: ‘int’ and ‘NoneType’

“Pages” was created a from a PDF document which was load_and_split by a PDFloader.
I also used a text file and it has the same error with add_texts() function.

But these files were successfully loaded into a vector db as embeddings through from_documents() command before.

Could you please help?

Thanks.

1 Like

did you find a solution for this yet?