-
Notifications
You must be signed in to change notification settings - Fork 19.8k
Open
Copy link
Labels
bugRelated to a bug, vulnerability, unexpected error with an existing featureRelated to a bug, vulnerability, unexpected error with an existing featurelangchain-classic
Description
Checked other resources
- This is a bug, not a usage question.
- I added a clear and descriptive title that summarizes this issue.
- I used the GitHub search to find a similar question and didn't find it.
- I am sure that this is a bug in LangChain rather than my code.
- The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
- This is not related to the langchain-community package.
- I posted a self-contained, minimal, reproducible example. A maintainer can copy it and run it AS IS.
Package (Required)
- langchain
- langchain-openai
- langchain-anthropic
- langchain-classic
- langchain-core
- langchain-cli
- langchain-model-profiles
- langchain-tests
- langchain-text-splitters
- langchain-chroma
- langchain-deepseek
- langchain-exa
- langchain-fireworks
- langchain-groq
- langchain-huggingface
- langchain-mistralai
- langchain-nomic
- langchain-ollama
- langchain-perplexity
- langchain-prompty
- langchain-qdrant
- langchain-xai
- Other / not sure / general
Example Code (Python)
Run pytest without the `--only_extended` flag set and it dies with a `ValueError`Error Message and Stack Trace (if applicable)
> INTERNALERROR> File "/build/source/libs/langchain/tests/unit_tests/conftest.py", line 85, in pytest_collection_modifyitems
> INTERNALERROR> only_extended = config.getoption("--only-extended") or False
> INTERNALERROR> ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
> INTERNALERROR> File "/nix/store/gx29m36wxs6vz4qk45m7n5pylpgj690y-python3.13-pytest-8.4.2/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1754, in getoption
> INTERNALERROR> raise ValueError(f"no option named {name!r}") from e
> INTERNALERROR> ValueError: no option named 'only_extended'Description
config.getoption("--only-extended")isn't returningNullwhen the flag is missing, it's throwingValueErrorconfig.getoptionaccepts adefaultparameter, see https://docs.pytest.org/en/stable/reference/reference.html#pytest.Config.getoption- Fix: Replace
config.getoption("--only-extended") or Falsewithconfig.getoption("--only-extended", default=False)
System Info
n/a
Metadata
Metadata
Assignees
Labels
bugRelated to a bug, vulnerability, unexpected error with an existing featureRelated to a bug, vulnerability, unexpected error with an existing featurelangchain-classic