kingjulio8238 / memary

Human Memory for AI Agents.
https://www.memarylabs.com
MIT License
1.14k stars 79 forks source link

Uncaught app exception #18

Closed chenggangqcg closed 1 month ago

chenggangqcg commented 1 month ago

2024-05-01 18:56:12.566 Uncaught app exception Traceback (most recent call last): File "/Users/doudou/miniconda3/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script exec(code, module.dict) File "/Users/doudou/project/memary/streamlit_app/app.py", line 19, in from src.agent.chat_agent import ChatAgent ModuleNotFoundError: No module named 'src'

kingjulio8238 commented 1 month ago

Hi @chenggangqcg

Thanks for reaching out. You would need to run the app from the streamlit folder based on the way we set the parent directory. The path to run it in should just be streamlit_app/.

Hope this helps and it works!

kingjulio8238 commented 1 month ago

To run the app: streamlit run streamlit_app/app.py (as seen in the readme)

shreybirmiwal commented 1 month ago

@chenggangqcg I had the same issue even though I followed the doc to run it, here's how I workaround it It has to do with the parent directory set by os package so that the code can access the diff folders

on /streamlit_app/app.py
replace:
parent_dir = os.path.dirname(curr_dir)
with:
parent_dir = os.path.dirname(curr_dir) + '/memary' 

Then, move the data folder from /streamlit_app to outside, at the same level as src