Eng-Elias / CrewAI-Visualizer

Interactive user interface for CrewAI package.
MIT License
293 stars 76 forks source link

Error message say TypeError CNo module named 'crewai' error when clicking run #5

Closed Chuck-iykyk closed 7 months ago

Chuck-iykyk commented 7 months ago

Clicking run I get the error on the page shown. In the terminal Is this: "public"."Agent"."verbose", "public"."Agent"."memory", "public"."Agent"."image", "public"."Agent"."createdAt", "public"."Agent"."updatedAt" FROM "public"."Agent" WHERE "public"."Agent"."id" IN ($1,$2,$3,$4,$5,$6) OFFSET $7 No module named 'crewai' image_2024-03-30_154257810

Eng-Elias commented 7 months ago

This is just a Prisma query description:

"public"."Agent"."verbose", "public"."Agent"."memory", "public"."Agent"."image", "public"."Agent"."createdAt", "public"."Agent"."updatedAt" FROM "public"."Agent" WHERE "public"."Agent"."id" IN ($1,$2,$3,$4,$5,$6) OFFSET $7

But this is the error:

No module named 'crewai'

The Solution: Ensure that you installed crewai in the venv and check the PYTHON_SITE_PACKAGES variable in .env file if you didn't create the venv in the project folder directly.

Note: Anyway the easiest way to install the project is to use setup.bat or setup.sh files. read the README for more details.

Eng-Elias commented 7 months ago

@Chuck-iykyk Please let me know if the problem is solved.

Chuck-iykyk commented 7 months ago

it looks right.

image_2024-03-31_140410009

Eng-Elias commented 7 months ago

The name of the folder must be venv not '.venv' and it must be the project folder directly.

Chuck-iykyk commented 7 months ago

thanks good catch! I fixed the script. Now I get prism errors trying to pull up missions I created previously. I will reinstall.

Eng-Elias commented 7 months ago

Yes, I suggest to reinstall it, it will reapply the migrations and I hope it will work fine. Please let me know when you can run the project.

Chuck-iykyk commented 7 months ago

After reinstall runing the bat. I see this in the vscode terminal image_2024-03-31_143647655

The app starts then I see this when clicking on Mission section: image_2024-03-31_143730084 Checking postgres I see the crew_ai_visualizer database but no tables.

Eng-Elias commented 7 months ago

try to delete the database then reinstall

Chuck-iykyk commented 7 months ago

new build on windows server. I still get the zero length error and no tables in the crew_ai database. image_2024-04-01_163259614

Chuck-iykyk commented 7 months ago

I just ran the *.sql and now the app comes up.

Eng-Elias commented 7 months ago

I think, if you ran this command before migrate, it might solve the issue: call npx prisma generate

Anyway, I am happy, you could solve the issue.