ModuleNotFoundError: No module named 'prisma.models'
jixn-hu opened this issue · comments
⚠️ Search for existing issues first ⚠️
- I have searched the existing issues, and there is no existing issue for my problem
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'
run prisma generate
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
It worked for me! Should this be included in the documentation? I'm running it on a MacBook computer.
It definitely should! Which docs are you following? We may have not updated one
@ntindle, this one https://docs.agpt.co/server/setup/
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