crewAIInc/crewAI · error · ValueError
Both `use_case` and `tags` cannot be `None`
Error message
Both `use_case` and `tags` cannot be `None`
What it means
Error "Both `use_case` and `tags` cannot be `None`" thrown in crewAIInc/crewAI.
Source
Thrown at lib/crewai-tools/src/crewai_tools/tools/composio_tool/composio_tool.py:109
),
composio_action=function,
**kwargs,
)
@classmethod
def from_app(
cls,
*apps: t.Any,
tags: list[str] | None = None,
use_case: str | None = None,
**kwargs: t.Any,
) -> list[te.Self]:
"""Create toolset from an app."""
if len(apps) == 0:
raise ValueError("You need to provide at least one app name")
if use_case is None and tags is None:
raise ValueError("Both `use_case` and `tags` cannot be `None`")
if use_case is not None and tags is not None:
raise ValueError(
"Cannot use both `use_case` and `tags` to filter the actions"
)
from composio import ComposioToolSet
toolset = ComposioToolSet()
if use_case is not None:
return [
cls.from_action(action=action, **kwargs)
for action in toolset.find_actions_by_use_case(*apps, use_case=use_case)
]
return [
cls.from_action(action=action, **kwargs)
for action in toolset.find_actions_by_tags(*apps, tags=tags) # type: ignore[arg-type]View on GitHub (pinned to 754d7323be)
Solutions
- Provide either `use_case` or `tags` to filter actions; at least one is required.
When it happens
Trigger: Thrown at lib/crewai-tools/src/crewai_tools/tools/composio_tool/composio_tool.py:109 when the library encounters an invalid state.
Common situations: Occurs when both use_case and tags are None when filtering Composio actions. Provide either use_case or tags.
AI-assisted analysis of crewAIInc/crewAI@754d7323be (2026-08-15).
Data as JSON: /api/errors/bc0f7d2cf0bcc74d.
Report an issue: GitHub.