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

Langgraph dev (cli) error with library #2841

Open
4 tasks done
rd-rugg opened this issue Dec 19, 2024 · 2 comments
Open
4 tasks done

Langgraph dev (cli) error with library #2841

rd-rugg opened this issue Dec 19, 2024 · 2 comments

Comments

@rd-rugg
Copy link

rd-rugg commented Dec 19, 2024

Checked other resources

  • This is a bug, not a usage question. For questions, please use GitHub Discussions.
  • I added a clear and detailed title that summarizes the issue.
  • I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
  • I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue.

Example Code

Error is inside an internal import.

Error Message and Stack Trace (if applicable)

Process SpawnProcess-1:
Traceback (most recent call last):
  File "C:\Users\cwzda\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "C:\Users\cwzda\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\cwzda\AppData\Local\pypoetry\Cache\virtualenvs\chat-analyzer-9qU6P2e3-py3.11\Lib\site-packages\uvicorn\_subprocess.py", line 80, in subprocess_started
    target(sockets=sockets)
  File "C:\Users\cwzda\AppData\Local\pypoetry\Cache\virtualenvs\chat-analyzer-9qU6P2e3-py3.11\Lib\site-packages\uvicorn\server.py", line 66, in run
    return asyncio.run(self.serve(sockets=sockets))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cwzda\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\cwzda\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cwzda\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "C:\Users\cwzda\AppData\Local\pypoetry\Cache\virtualenvs\chat-analyzer-9qU6P2e3-py3.11\Lib\site-packages\uvicorn\server.py", line 70, in serve
    await self._serve(sockets)
  File "C:\Users\cwzda\AppData\Local\pypoetry\Cache\virtualenvs\chat-analyzer-9qU6P2e3-py3.11\Lib\site-packages\uvicorn\server.py", line 77, in _serve
    config.load()
  File "C:\Users\cwzda\AppData\Local\pypoetry\Cache\virtualenvs\chat-analyzer-9qU6P2e3-py3.11\Lib\site-packages\uvicorn\config.py", line 435, in load
    self.loaded_app = import_from_string(self.app)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cwzda\AppData\Local\pypoetry\Cache\virtualenvs\chat-analyzer-9qU6P2e3-py3.11\Lib\site-packages\uvicorn\importer.py", line 19, in import_from_string
    module = importlib.import_module(module_str)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cwzda\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\cwzda\AppData\Local\pypoetry\Cache\virtualenvs\chat-analyzer-9qU6P2e3-py3.11\Lib\site-packages\langgraph_api\server.py", line 12, in <module>
    from langgraph_api.api import routes
  File "C:\Users\cwzda\AppData\Local\pypoetry\Cache\virtualenvs\chat-analyzer-9qU6P2e3-py3.11\Lib\site-packages\langgraph_api\api\__init__.py", line 7, in <module>
    from langgraph_api.api.assistants import assistants_routes
  File "C:\Users\cwzda\AppData\Local\pypoetry\Cache\virtualenvs\chat-analyzer-9qU6P2e3-py3.11\Lib\site-packages\langgraph_api\api\assistants.py", line 10, in <module>
    from langgraph_api.graph import get_assistant_id, get_graph
  File "C:\Users\cwzda\AppData\Local\pypoetry\Cache\virtualenvs\chat-analyzer-9qU6P2e3-py3.11\Lib\site-packages\langgraph_api\graph.py", line 24, in <module>
    from langgraph_api.js.remote import RemotePregel
  File "C:\Users\cwzda\AppData\Local\pypoetry\Cache\virtualenvs\chat-analyzer-9qU6P2e3-py3.11\Lib\site-packages\langgraph_api\js\remote.py", line 30, in <module>
    from langgraph_api.route import ApiResponse
  File "C:\Users\cwzda\AppData\Local\pypoetry\Cache\virtualenvs\chat-analyzer-9qU6P2e3-py3.11\Lib\site-packages\langgraph_api\route.py", line 17, in <module>
    from langgraph_api.utils import set_auth_ctx
  File "C:\Users\cwzda\AppData\Local\pypoetry\Cache\virtualenvs\chat-analyzer-9qU6P2e3-py3.11\Lib\site-packages\langgraph_api\utils.py", line 8, in <module>
    from langgraph_sdk import Auth
ImportError: cannot import name 'Auth' from 'langgraph_sdk' (C:\Users\cwzda\AppData\Local\pypoetry\Cache\virtualenvs\chat-analyzer-9qU6P2e3-py3.11\Lib\site-packages\langgraph_sdk\__init__.py)

Description

I am trying to run langgraph CLI but I am getting Import Errors.
For dependency management, I am using poetry. Here is the full requirements:

python = "^3.11"
pandas = "^2.2.3"
openai = "^1.57.0"
langchain = "^0.3.9"
tiktoken = "^0.8.0"
langchain-openai = "^0.2.11"
langchain-anthropic = "^0.3.0"
instructor = "^1.7.0"
tavily-python = "^0.5.0"
langgraph = "^0.2.56"
fastapi = "^0.115.6"
twilio = "^9.3.8"
python-dotenv = "^1.0.1"
langchain-community = "^0.3.10"
supabase = "^2.10.0"
sqlmodel = "^0.0.22"
boto3 = "^1.35.83"
uvicorn = "^0.34.0"
python-multipart = "^0.0.20"
langgraph-cli = {extras = ["inem"], version = "^0.1.65"}

System Info

langgraph dev

@hinthornw
Copy link
Contributor

Hi can you update langgraph-cli[inmem] please?

@rd-rugg
Copy link
Author

rd-rugg commented Dec 19, 2024

If I set:
langgraph-cli = {extras = ["inem"], version = "^0.2.60"}

I get:
Because chat-analyzer depends on langgraph-cli[inem] (>=0.2.60,<0.3.0) which doesn't match any versions, version solving failed.

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