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

Calling langgraph up i get the error langgraph-api-1 | FileNotFoundError: [Errno 2] No such file or directory: '/deps/langgraph-example-pyproject/my_agent\\agent.py #2061

Open
5 tasks done
Andrei-Tocut opened this issue Oct 9, 2024 · 4 comments
Assignees

Comments

@Andrei-Tocut
Copy link

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangGraph/LangChain documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangGraph/LangChain rather than my code.
  • I am sure this is better as an issue rather than a GitHub discussion, since this is a LangGraph bug and not a design question.

Example Code

langgraph up

Error Message and Stack Trace (if applicable)

langgraph-api-1       | 2024-10-09T06:31:32.686169Z [error    ] Traceback (most recent call last):
langgraph-api-1       |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 693, in lifespan
langgraph-api-1       |     async with self.lifespan_context(app) as maybe_state:
langgraph-api-1       |   File "/usr/local/lib/python3.11/contextlib.py", line 210, in __aenter__
langgraph-api-1       |     return await anext(self.gen)
langgraph-api-1       |            ^^^^^^^^^^^^^^^^^^^^^
langgraph-api-1       |   File "/api/langgraph_api/lifespan.py", line 23, in lifespan
langgraph-api-1       |   File "/api/langgraph_api/shared/graph.py", line 205, in collect_graphs_from_env
langgraph-api-1       |   File "/usr/local/lib/python3.11/site-packages/langchain_core/runnables/config.py", line 590, in run_in_executor
langgraph-api-1       |     return await asyncio.get_running_loop().run_in_executor(
langgraph-api-1       |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
langgraph-api-1       |   File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
langgraph-api-1       |     result = self.fn(*self.args, **self.kwargs)
langgraph-api-1       |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
langgraph-api-1       |   File "/usr/local/lib/python3.11/site-packages/langchain_core/runnables/config.py", line 581, in wrapper
langgraph-api-1       |     return func(*args, **kwargs)
langgraph-api-1       |            ^^^^^^^^^^^^^^^^^^^^^
langgraph-api-1       |   File "/api/langgraph_api/shared/graph.py", line 233, in _graph_from_spec
langgraph-api-1       |   File "<frozen importlib._bootstrap_external>", line 936, in exec_module
langgraph-api-1       |   File "<frozen importlib._bootstrap_external>", line 1073, in get_code
langgraph-api-1       |   File "<frozen importlib._bootstrap_external>", line 1130, in get_data
langgraph-api-1       | FileNotFoundError: [Errno 2] No such file or directory: '/deps/langgraph-example-pyproject/my_agent\\agent.py'
langgraph-api-1       |  [uvicorn.error] api_revision=e09c235 api_variant=licensed
langgraph-api-1       | 2024-10-09T06:31:32.686561Z [error    ] Application startup failed. Exiting. [uvicorn.error] api_revision=e09c235 api_variant=licensed
langgraph-api-1 exited with code 3

Description

I want to test the langgraph locally fist before deploy and when i run langgraph up i get the following error langgraph-api-1 | FileNotFoundError: [Errno 2] No such file or directory: '/deps/langgraph-example-pyproject/my_agent\\agent.py. While i encountered this issue i cloned the example project from this and attepmpted to serve it up but i got the same issue. Might it be because i am using windows? But it shouldnt matter since it runs in a docker container.

System Info

langgraph.json

`
{
"dependencies": ["."],
"graphs": {
"agent": "./my_agent/agent.py:graph"
},
"env": ".env"
}

`

pyproject.toml

`
[tool.poetry]
name = "my_agent"
version = "0.1.0"
description = "Example LangGraph project for deployment to LangGraph Cloud"
authors = [
"langchain-ai"
]
packages = [
{ include = "my_agent" },
]

[tool.poetry.dependencies]
python = ">=3.9.0,<3.13"
langgraph = "^0.2.0"
langchain_anthropic = "^0.1.0"
langchain_core = "^0.2.0"
langchain_openai = "^0.1.0"
tavily-python = "^0.3.0"
langchain_community = "^0.2.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
`

OS Name Microsoft Windows 10 Enterprise
Version 10.0.19045 Build 19045

❯ langchain --version
langchain-cli 0.0.31

@Andrei-Tocut
Copy link
Author

this is the config for the other project

`
[tool.poetry]
name = "quinn_agent"
version = "0.1.0"
description = ""
readme = "README.md"

packages = [
{ include = "quinn_agent" },
]

[tool.poetry.dependencies]
python = ">=3.12,<3.13"
langchain = "^0.3.2"
langchain-openai = "^0.2.2"
langchainhub = "^0.1.21"
langchain-pinecone = "^0.2.0"
python-dotenv = "^1.0.1"
langgraph = "^0.2.34"
neo4j = "^5.25.0"
lark = "^1.2.2"
pydantic = "^2.9.2"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
`

{ "python_version": "3.12", "dependencies": [ "." ], "graphs": { "agent": "./quinn_agent/agent.py:graph" }, "env": ".env" }
File structure

image

@vbarda
Copy link
Collaborator

vbarda commented Oct 9, 2024

@Andrei-Tocut yes, Windows is not currently supported but we're working on adding support

@p4norman
Copy link

+1

@githubramu
Copy link

+1
I see the error like below...tryies to use npm to install for python instead of pip

[langgraph-api 3/5] RUN cd /deps/langgraph_001 && npm i:

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

5 participants