Significant-Gravitas / AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
https://agpt.co
MIT License
166.49k stars 44.06k forks source link

ModuleNotFoundError: No module named 'prisma.models' #7726

Open jixn-hu opened 1 month ago

jixn-hu commented 1 month ago

⚠️ Search for existing issues first ⚠️

Which Operating System are you using?

Windows

Which version of AutoGPT are you using?

Latest Release

What LLM Provider do you use?

Azure

Which area covers your issue best?

Installation and setup

What commit or version are you using?

安装报错

Describe your issue.

from prisma.models import AgentBlock

ModuleNotFoundError: No module named 'prisma.models' 安装

Upload Activity Log Content

No response

Upload Error Log Content

Traceback (most recent call last): File "", line 1, in File "C:\Users\huqx2\AppData\Local\Programs\Python\Python312\Lib\importlib__init.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "", line 995, in exec_module File "", line 488, in _call_with_frames_removed File "E:\jixn\AutoGPT-master\rnd\autogpt_server\autogpt_server\app.py", line 3, in from autogpt_server.executor import ExecutionManager, ExecutionScheduler File "E:\jixn\AutoGPT-master\rnd\autogpt_server\autogpt_server\executor__init__.py", line 1, in from .manager import ExecutionManager File "E:\jixn\AutoGPT-master\rnd\autogpt_server\autogpt_server\executor\manager.py", line 10, in from autogpt_server.blocks.basic import InputBlock File "E:\jixn\AutoGPT-master\rnd\autogpt_server\autogpt_server\blocks\init__.py", line 7, in from autogpt_server.data.block import Block File "E:\jixn\AutoGPT-master\rnd\autogpt_server\autogpt_server\data\block.py", line 7, in from prisma.models import AgentBlock ModuleNotFoundError: No module named 'prisma.models'

ntindle commented 1 month ago

run prisma generate

Swiftyos commented 1 month ago

As @ntindle has said. You need to generate the database model using the prisma generate command.

You can run it using poetry run prisma generate or If you are in a poetry shell just run prisma generate

gvsrepins commented 1 month ago

It worked for me! Should this be included in the documentation? I'm running it on a MacBook computer.

ntindle commented 1 month ago

It definitely should! Which docs are you following? We may have not updated one

gvsrepins commented 1 month ago

@ntindle, this one https://docs.agpt.co/server/setup/

ntindle commented 1 month ago

Yeah it's missing there alright. Do you want to add it as a contribution or I can? Let me know!

It will live just after the migrate deploy step