{"id":"4e75bb81868c5a48","repo":"redis/redis-py","slug":"slot-slot-is-not-covered-by-the-cluster-4e75bb","errorCode":null,"errorMessage":"Slot \"{slot}\" is not covered by the cluster.","messagePattern":"Slot \"(.+?)\" is not covered by the cluster\\.","errorType":"exception","errorClass":"SlotNotCoveredError","httpStatus":null,"severity":"error","filePath":"redis/cluster.py","lineNumber":1071,"sourceCode":"        \"\"\"\n        if self.read_from_replicas and command_name in READ_COMMANDS:\n            return self.get_random_node()\n\n        return self.get_random_primary_node()\n\n    def get_nodes(self):\n        return list(self.nodes_manager.nodes_cache.values())\n\n    def get_node_from_key(self, key, replica=False):\n        \"\"\"\n        Get the node that holds the key's slot.\n        If replica set to True but the slot doesn't have any replicas, None is\n        returned.\n        \"\"\"\n        slot = self.keyslot(key)\n        slot_cache = self.nodes_manager.slots_cache.get(slot)\n        if slot_cache is None or len(slot_cache) == 0:\n            raise SlotNotCoveredError(f'Slot \"{slot}\" is not covered by the cluster.')\n        if replica and len(self.nodes_manager.slots_cache[slot]) < 2:\n            return None\n        elif replica:\n            node_idx = 1\n        else:\n            # primary\n            node_idx = 0\n\n        return slot_cache[node_idx]\n\n    def get_default_node(self):\n        \"\"\"\n        Get the cluster's default node\n        \"\"\"\n        return self.nodes_manager.default_node\n\n    def get_nodes_from_slot(self, command: str, *args):\n        \"\"\"","sourceCodeStart":1053,"sourceCodeEnd":1089,"githubUrl":"https://github.com/redis/redis-py/blob/da03cdc7e8731092b13e395605c3c1fb2de25de1/redis/cluster.py#L1053-L1089","documentation":"Error \"Slot \"{slot}\" is not covered by the cluster.\" thrown in redis/redis-py.","triggerScenarios":"Thrown at redis/cluster.py:1071 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"da03cdc7e8731092b13e395605c3c1fb2de25de1","analyzedAt":"2026-08-04T20:26:47.563Z","schemaVersion":2}