If run it without adding knowledge_sources, it should work fine.
how to fix it?
First off, welcome!
Regarding the error youâre getting, it looks like there might be an issue with how youâre setting up your knowledge_sources
. So, hereâs what I suggest:
knowledge_sources
.In addition to Maxâs great advice. I found getting a really simple crew running first as a base is a good idea and then add complexity to it.
To that end this is a good video from CrewAI for setting up https://www.youtube.com/watch?v=-kSOTtYzgEw
Would love to hear how you are getting on
After watching this video, I ran it on my first setup and it worked fine. Then I ran âcrewai runâ with just one additional pdf and got the error âsqlite3.OperationalError: no such module: fts5â,
After that, I ran âcrewai runâ one more time without any action, and got the error âsqlite3.OperationalError: table embeddings already existsâ.
I attach my code snippet.
I tried testing with StringKnowledgeSource, but got the same error.
When using KnowledgeSource, the embeddings table seems to be the problem in the part where sqlite3 uses the DB, but I donât know how to fix it.
Iâm using ubuntu 20.04, and Iâm using python 3.11.12
Oh yes, python gives some really rubbish error messages that mean nothing⌠well not to me or cursor.
I look to use the following at the standard setup needs all âknowledgeâ Knowledge - CrewAI to be in this directory.
You are working with a potential python issue where it cannot find the file. I tend to play with the location of the file, so try â[full path]/knowledge/text/pdfâ etc. You can play with the Path() python as well.
As this is a rabbit hole. Well it was for me. I prefer to get âsomething workingâ and then modify.
Try using the String knowledge source as it mean you can remove the PDF location issues and see if there is another issue.
from crewai.knowledge.source.string_knowledge_source import StringKnowledgeSource
content = âUsers name is John. He is 30 years old and lives in San Francisco.â
string_source = StringKnowledgeSource(
content=content,
)
Hopefully this gets you further.
For CrewAI : Can we have the crewai check for things like this. Maybe a simple check or advice. The examples are good but vague enough to cause issues for non experts.
For me the issues are generally.
Agents and Tasks not matching Yaml files
File locations for knowledge sources
Tabbing on yaml files
Even better errors would be better as Cursor and chatgpt cannot figure them out.
Keep at it Mono⌠You are almost there⌠and the results are worth it!!
Using StringKnowledgeSource, the result is same
âsqlite3.OperationalError: table embeddings already existsâ
Below is snippet of using StringKnowledgeSource
ok then i recommend following the video as it is likely to be something about your setup. Do not worry, once you figure it out CrewAI is as solid as a rock
I am facing the same problem! No one seems to have a solution . I made an account because itâs been days at this point!
The single best way to improve your chances of getting help is to provide a minimal, reproducible example, that is, a small, fully functional version of what youâre trying to do so that others can run the same code and figure out the problem.
Here is a fully functional example. You can use it as a starting point to build the code that reproduces your error.
Thank you for the example! I will try this again and build out from there. CrewAI is my favorite framework so far!