[GH-ISSUE #990] [langchain]: Unable to run quickstart example after following install page #128

Closed
opened 2026-02-17 17:19:14 -05:00 by yindo · 2 comments
Owner

Originally created by @jChapman on GitHub (Oct 19, 2025).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/990

Originally assigned to: @sydney-runkle on GitHub.

Type of issue

issue / bug

Language

Python

Description

Running on Ubuntu 22.04.5 LTS within WSL2 (cpython-3.11.13-linux-x86_64-gnu)

Followed https://docs.langchain.com/oss/python/langchain/install using uv
Copied the full example source code at the bottom of https://docs.langchain.com/oss/python/langchain/quickstart

Error when running the code:

Traceback (most recent call last):
  File "/home/jordan/projects/blah/main.py", line 31, in <module>
    def get_user_location(runtime: ToolRuntime[Context]) -> str:
                                   ~~~~~~~~~~~^^^^^^^^^
  File "/home/jordan/.local/share/uv/python/cpython-3.11.13-linux-x86_64-gnu/lib/python3.11/typing.py", line 379, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/jordan/.local/share/uv/python/cpython-3.11.13-linux-x86_64-gnu/lib/python3.11/typing.py", line 1864, in __class_getitem__
    _check_generic(cls, params, len(cls.__parameters__))
  File "/home/jordan/projects/blah/.venv/lib/python3.11/site-packages/typing_extensions.py", line 3136, in _check_generic
    raise TypeError(f"Too {'many' if alen > elen else 'few'} arguments"
TypeError: Too few arguments for <class 'langchain.tools.tool_node.ToolRuntime'>; actual 1, expected at least 2

Full ish command line steps I ran:

❯ cd projects
❯ uv init blah
Initialized project `blah` at `/home/jordan/projects/blah`
❯ cd blah
❯ uv add langchain
Using CPython 3.11.13
Creating virtual environment at: .venv
Resolved 33 packages in 20.14s
Prepared 3 packages in 8.63s
Installed 32 packages in 31ms
 + annotated-types==0.7.0
 + anyio==4.11.0
 + certifi==2025.10.5
 + charset-normalizer==3.4.4
 + h11==0.16.0
 + httpcore==1.0.9
 + httpx==0.28.1
 + idna==3.11
 + jsonpatch==1.33
 + jsonpointer==3.0.0
 + langchain==1.0.0
 + langchain-core==1.0.0
 + langgraph==1.0.0
 + langgraph-checkpoint==2.1.2
 + langgraph-prebuilt==1.0.0
 + langgraph-sdk==0.2.9
 + langsmith==0.4.37
 + orjson==3.11.3
 + ormsgpack==1.11.0
 + packaging==25.0
 + pydantic==2.12.3
 + pydantic-core==2.41.4
 + pyyaml==6.0.3
 + requests==2.32.5
 + requests-toolbelt==1.0.0
 + sniffio==1.3.1
 + tenacity==9.1.2
 + typing-extensions==4.15.0
 + typing-inspection==0.4.2
 + urllib3==2.5.0
 + xxhash==3.6.0
 + zstandard==0.25.0
❯ uv add --prerelease=allow langchain-openai
Resolving despite existing lockfile due to change in pre-release mode: `if-necessary-or-explicit` vs. `allow`
Resolved 41 packages in 9.31s
Installed 7 packages in 61ms
 + distro==1.9.0
 + jiter==0.11.1
 + langchain-openai==1.0.0
 + openai==2.5.0
 + regex==2025.9.18
 + tiktoken==0.12.0
 + tqdm==4.67.1
❯ code .
❯ uv run main.py
Traceback (most recent call last):
  File "/home/jordan/projects/blah/main.py", line 31, in <module>
    def get_user_location(runtime: ToolRuntime[Context]) -> str:
                                   ~~~~~~~~~~~^^^^^^^^^
  File "/home/jordan/.local/share/uv/python/cpython-3.11.13-linux-x86_64-gnu/lib/python3.11/typing.py", line 379, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/jordan/.local/share/uv/python/cpython-3.11.13-linux-x86_64-gnu/lib/python3.11/typing.py", line 1864, in __class_getitem__
    _check_generic(cls, params, len(cls.__parameters__))
  File "/home/jordan/projects/blah/.venv/lib/python3.11/site-packages/typing_extensions.py", line 3136, in _check_generic
    raise TypeError(f"Too {'many' if alen > elen else 'few'} arguments"
TypeError: Too few arguments for <class 'langchain.tools.tool_node.ToolRuntime'>; actual 1, expected at least 2
Originally created by @jChapman on GitHub (Oct 19, 2025). Original GitHub issue: https://github.com/langchain-ai/docs/issues/990 Originally assigned to: @sydney-runkle on GitHub. ### Type of issue issue / bug ### Language Python ### Description Running on Ubuntu 22.04.5 LTS within WSL2 (cpython-3.11.13-linux-x86_64-gnu) Followed https://docs.langchain.com/oss/python/langchain/install using uv Copied the full example source code at the bottom of https://docs.langchain.com/oss/python/langchain/quickstart Error when running the code: ``` Traceback (most recent call last): File "/home/jordan/projects/blah/main.py", line 31, in <module> def get_user_location(runtime: ToolRuntime[Context]) -> str: ~~~~~~~~~~~^^^^^^^^^ File "/home/jordan/.local/share/uv/python/cpython-3.11.13-linux-x86_64-gnu/lib/python3.11/typing.py", line 379, in inner return func(*args, **kwds) ^^^^^^^^^^^^^^^^^^^ File "/home/jordan/.local/share/uv/python/cpython-3.11.13-linux-x86_64-gnu/lib/python3.11/typing.py", line 1864, in __class_getitem__ _check_generic(cls, params, len(cls.__parameters__)) File "/home/jordan/projects/blah/.venv/lib/python3.11/site-packages/typing_extensions.py", line 3136, in _check_generic raise TypeError(f"Too {'many' if alen > elen else 'few'} arguments" TypeError: Too few arguments for <class 'langchain.tools.tool_node.ToolRuntime'>; actual 1, expected at least 2 ``` Full ish command line steps I ran: ``` ❯ cd projects ❯ uv init blah Initialized project `blah` at `/home/jordan/projects/blah` ❯ cd blah ❯ uv add langchain Using CPython 3.11.13 Creating virtual environment at: .venv Resolved 33 packages in 20.14s Prepared 3 packages in 8.63s Installed 32 packages in 31ms + annotated-types==0.7.0 + anyio==4.11.0 + certifi==2025.10.5 + charset-normalizer==3.4.4 + h11==0.16.0 + httpcore==1.0.9 + httpx==0.28.1 + idna==3.11 + jsonpatch==1.33 + jsonpointer==3.0.0 + langchain==1.0.0 + langchain-core==1.0.0 + langgraph==1.0.0 + langgraph-checkpoint==2.1.2 + langgraph-prebuilt==1.0.0 + langgraph-sdk==0.2.9 + langsmith==0.4.37 + orjson==3.11.3 + ormsgpack==1.11.0 + packaging==25.0 + pydantic==2.12.3 + pydantic-core==2.41.4 + pyyaml==6.0.3 + requests==2.32.5 + requests-toolbelt==1.0.0 + sniffio==1.3.1 + tenacity==9.1.2 + typing-extensions==4.15.0 + typing-inspection==0.4.2 + urllib3==2.5.0 + xxhash==3.6.0 + zstandard==0.25.0 ❯ uv add --prerelease=allow langchain-openai Resolving despite existing lockfile due to change in pre-release mode: `if-necessary-or-explicit` vs. `allow` Resolved 41 packages in 9.31s Installed 7 packages in 61ms + distro==1.9.0 + jiter==0.11.1 + langchain-openai==1.0.0 + openai==2.5.0 + regex==2025.9.18 + tiktoken==0.12.0 + tqdm==4.67.1 ❯ code . ❯ uv run main.py Traceback (most recent call last): File "/home/jordan/projects/blah/main.py", line 31, in <module> def get_user_location(runtime: ToolRuntime[Context]) -> str: ~~~~~~~~~~~^^^^^^^^^ File "/home/jordan/.local/share/uv/python/cpython-3.11.13-linux-x86_64-gnu/lib/python3.11/typing.py", line 379, in inner return func(*args, **kwds) ^^^^^^^^^^^^^^^^^^^ File "/home/jordan/.local/share/uv/python/cpython-3.11.13-linux-x86_64-gnu/lib/python3.11/typing.py", line 1864, in __class_getitem__ _check_generic(cls, params, len(cls.__parameters__)) File "/home/jordan/projects/blah/.venv/lib/python3.11/site-packages/typing_extensions.py", line 3136, in _check_generic raise TypeError(f"Too {'many' if alen > elen else 'few'} arguments" TypeError: Too few arguments for <class 'langchain.tools.tool_node.ToolRuntime'>; actual 1, expected at least 2 ```
yindo added the langchain label 2026-02-17 17:19:14 -05:00
yindo closed this issue 2026-02-17 17:19:14 -05:00
Author
Owner

@mdrxy commented on GitHub (Oct 19, 2025):

Thanks for flagging; will be fixed promptly

@mdrxy commented on GitHub (Oct 19, 2025): Thanks for flagging; will be fixed promptly
Author
Owner

@sydney-runkle commented on GitHub (Oct 20, 2025):

Fixed via https://github.com/langchain-ai/langchain/pull/33606 and released in 1.0.1 thanks!!!

@sydney-runkle commented on GitHub (Oct 20, 2025): Fixed via https://github.com/langchain-ai/langchain/pull/33606 and released in 1.0.1 thanks!!!
yindo changed title from [langchain]: Unable to run quickstart example after following install page to [GH-ISSUE #990] [langchain]: Unable to run quickstart example after following install page 2026-06-05 17:25:12 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#128