redis/redis-py · error · SlotNotCoveredError
Slot "{slot}" is not covered by the cluster.
Error message
Slot "{slot}" is not covered by the cluster. What it means
Error "Slot "{slot}" is not covered by the cluster." thrown in redis/redis-py.
Source
Thrown at redis/cluster.py:1071
"""
if self.read_from_replicas and command_name in READ_COMMANDS:
return self.get_random_node()
return self.get_random_primary_node()
def get_nodes(self):
return list(self.nodes_manager.nodes_cache.values())
def get_node_from_key(self, key, replica=False):
"""
Get the node that holds the key's slot.
If replica set to True but the slot doesn't have any replicas, None is
returned.
"""
slot = self.keyslot(key)
slot_cache = self.nodes_manager.slots_cache.get(slot)
if slot_cache is None or len(slot_cache) == 0:
raise SlotNotCoveredError(f'Slot "{slot}" is not covered by the cluster.')
if replica and len(self.nodes_manager.slots_cache[slot]) < 2:
return None
elif replica:
node_idx = 1
else:
# primary
node_idx = 0
return slot_cache[node_idx]
def get_default_node(self):
"""
Get the cluster's default node
"""
return self.nodes_manager.default_node
def get_nodes_from_slot(self, command: str, *args):
"""View on GitHub (pinned to da03cdc7e8)
When it happens
Trigger: Thrown at redis/cluster.py:1071 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/4e75bb81868c5a48.json.
Report an issue: GitHub.