Getting ERROR Table not initialized. Please create the table first while calling PDFKnowledgeBase

Hello, Can you help here?

pdf_knowledge_base = PDFKnowledgeBase(
path=“C:/archive(21)”,
#Use LanceDB as the vector database
vector_db=LanceDb(
table_name=“pdf_documents”,
uri=“data/lancedb”,
search_type=SearchType.vector,
embedder=OpenAIEmbedder(model=“text-embedding-3-small”),
),
reader=PDFReader(chunk=True),
)

pdf_knowledge_base.load(recreate=True)

pdf_knowledge_base.load(recreate=True or False) does not help.

Hi @gsriniva
Thank you for reaching out and using Phidata! I’ve tagged the relevant engineers to assist you with your query. We aim to respond within 24 hours.
If this is urgent, please feel free to let us know, and we’ll do our best to prioritize it.
Thanks for your patience!

I have the same question with this script:

from dotenv import load_dotenv

load_dotenv()

Create a knowledge base from a PDF

knowledge_base = PDFUrlKnowledgeBase(
urls=[“https://phi-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf”],
# Use LanceDB as the vector database
vector_db=LanceDb(
table_name=“recipes”,
uri=“tmp/lancedb”,
search_type=SearchType.vector,
embedder=OpenAIEmbedder(model=“text-embedding-3-small”),
),
)
knowledge_base.load()

results in:
INFO Creating collection
INFO Loading knowledge base
INFO Reading: https://phi-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf
ERROR Table not initialized. Please create the table first
INFO Added 14 documents to knowledge base

created an agent nevertheless, but seems no knowledge about provided subject present

This was a bug in the lance-db implementation. We are releasing a fix tomorrow (it is already merged).

It is working now. Thanks