Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'agent_graph' #10

Open
davidtkeane opened this issue Jul 17, 2024 · 1 comment
Open

ModuleNotFoundError: No module named 'agent_graph' #10

davidtkeane opened this issue Jul 17, 2024 · 1 comment

Comments

@davidtkeane
Copy link

Running the script.

chainlit run chat.py -w
Traceback (most recent call last):
File "/Volumes/KaliPro/Applications/miniconda3/envs/ranger/bin/chainlit", line 8, in
sys.exit(cli())
^^^^^
File "/Volumes/KaliPro/Applications/miniconda3/envs/ranger/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Volumes/KaliPro/Applications/miniconda3/envs/ranger/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/Volumes/KaliPro/Applications/miniconda3/envs/ranger/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Volumes/KaliPro/Applications/miniconda3/envs/ranger/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Volumes/KaliPro/Applications/miniconda3/envs/ranger/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Volumes/KaliPro/Applications/miniconda3/envs/ranger/lib/python3.11/site-packages/chainlit/cli/init.py", line 154, in chainlit_run
run_chainlit(target)
File "/Volumes/KaliPro/Applications/miniconda3/envs/ranger/lib/python3.11/site-packages/chainlit/cli/init.py", line 56, in run_chainlit
load_module(config.run.module_name)
File "/Volumes/KaliPro/Applications/miniconda3/envs/ranger/lib/python3.11/site-packages/chainlit/config.py", line 409, in load_module
spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/Volumes/KaliPro/Applications/Documents/Python_Projects/Ranger_Python/AI_Apps_GitHub/Github/LangGraph - Custom WebSearch Agent with John Adoeojo/graph_websearch_agent/app/chat.py", line 6, in
from agent_graph.graph import create_graph, compile_workflow
ModuleNotFoundError: No module named 'agent_graph'

from agent_graph.graph import create_graph, compile_workflow

For some reason the app.py or chat.py files will not see the agent_graph folder.

Macbook Pro M3
VSCode
Python 3.11.9

  1. Installed without Conda env.
  2. Creaed Conda env and same error.

I tried,
A: from ..agent_graph.graph import create_graph, compile_workflow
B: from subdirectory.agent_graph.graph import create_graph, compile_workflow

No joy so far!

@nirvana124
Copy link

use run_linux.sh script to start the app or Set PYTHONPATH to the current directory
export PYTHONPATH=$(pwd)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants