EniasCailliau / GirlfriendGPT

Girlfriend GPT is a Python project to build your own AI girlfriend using ChatGPT4.0
https://gptgirlfriend.online
2.58k stars 435 forks source link

Import Error "No module named 'agent.base'; 'agent' is not a package" #37

Closed Joemolnos closed 1 year ago

Joemolnos commented 1 year ago

I try to run it locally after installing -"requirements.txt" but I get an error that says 'agent' is not a package. How can i resolve this?

NetroScript commented 1 year ago

The author of this repository broke this in https://github.com/EniasCailliau/GirlfriendGPT/commit/c84939420876357b0271bbf5452b9c8cc495af77 by adding the from agent.base import ChatMessage import before adding the necessary path to the environment for it.

In the main.py move the line 6 sys.path.insert(0, "src") in front of the line 4 from agent.base import ChatMessage.

The beginning of your file should then look like this ```python import os import sys sys.path.insert(0, "src") from agent.base import ChatMessage ```
EniasCailliau commented 1 year ago

Thanks for the fix @NetroScript!

Just pushed a fix to main 🚀