{"id":"7acdf1d88cd8908c","repo":"celery/celery","slug":"must-implement-the-set-method","errorCode":null,"errorMessage":"Must implement the set method.","messagePattern":"Must implement the set method\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"celery/backends/base.py","lineNumber":1011,"sourceCode":"            self.group_keyprefix = f\"{global_keyprefix}{self.group_keyprefix}\"\n            self.chord_keyprefix = f\"{global_keyprefix}{self.chord_keyprefix}\"\n\n    def _encode_prefixes(self):\n        self.task_keyprefix = self.key_t(self.task_keyprefix)\n        self.group_keyprefix = self.key_t(self.group_keyprefix)\n        self.chord_keyprefix = self.key_t(self.chord_keyprefix)\n\n    def get(self, key):\n        raise NotImplementedError('Must implement the get method.')\n\n    def mget(self, keys):\n        raise NotImplementedError('Does not support get_many')\n\n    def _set_with_state(self, key, value, state):\n        return self.set(key, value)\n\n    def set(self, key, value):\n        raise NotImplementedError('Must implement the set method.')\n\n    def delete(self, key):\n        raise NotImplementedError('Must implement the delete method')\n\n    def incr(self, key):\n        raise NotImplementedError('Does not implement incr')\n\n    def expire(self, key, value):\n        pass\n\n    def get_key_for_task(self, task_id, key=''):\n        \"\"\"Get the cache key for a task by id.\"\"\"\n        if not task_id:\n            raise ValueError(f'task_id must not be empty. Got {task_id} instead.')\n        return self._get_key_for(self.task_keyprefix, task_id, key)\n\n    def get_key_for_group(self, group_id, key=''):\n        \"\"\"Get the cache key for a group by id.\"\"\"","sourceCodeStart":993,"sourceCodeEnd":1029,"githubUrl":"https://github.com/celery/celery/blob/571efe81202341310b6257304980ba7898ab0f60/celery/backends/base.py#L993-L1029","documentation":"Error \"Must implement the set method.\" thrown in celery/celery.","triggerScenarios":"Thrown at celery/backends/base.py:1011 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":"571efe81202341310b6257304980ba7898ab0f60","analyzedAt":"2026-08-04T20:17:20.567Z","schemaVersion":2}