Skip to content

ModuleNotFoundError: No module named 'agent_graph' #10

@davidtkeane

Description

@davidtkeane

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions