redis/redis-py · error · RedisClusterException
No targets were found to execute {args} command on
Error message
No targets were found to execute {args} command on What it means
Error "No targets were found to execute {args} command on" thrown in redis/redis-py.
Source
Thrown at redis/cluster.py:1623
execute_attempts = 1 + retry_attempts
failure_count = 0
# Start timing for observability
start_time = time.monotonic()
for _ in range(execute_attempts):
try:
res = {}
if not target_nodes_specified:
# Determine the nodes to execute the command on
target_nodes = self._determine_nodes(
*args,
request_policy=command_policies.request_policy,
nodes_flag=passed_targets,
)
if not target_nodes:
raise RedisClusterException(
f"No targets were found to execute {args} command on"
)
if (
len(target_nodes) == 1
and target_nodes[0] == self.get_default_node()
):
is_default_node = True
for node in target_nodes:
res[node.name] = self._execute_command(node, *args, **kwargs)
if command_policies.response_policy == ResponsePolicy.ONE_SUCCEEDED:
break
# Return the processed result
return self._process_result(
args[0],
res,
response_policy=command_policies.response_policy,View on GitHub (pinned to da03cdc7e8)
When it happens
Trigger: Thrown at redis/cluster.py:1623 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of redis/redis-py@da03cdc7e8 (2026-08-04).
Data as JSON: /data/errors/870237e8a6794650.json.
Report an issue: GitHub.