celery/celery · error · NotImplementedError
Must implement the set method.
Error message
Must implement the set method.
What it means
Error "Must implement the set method." thrown in celery/celery.
Source
Thrown at celery/backends/base.py:1011
self.group_keyprefix = f"{global_keyprefix}{self.group_keyprefix}"
self.chord_keyprefix = f"{global_keyprefix}{self.chord_keyprefix}"
def _encode_prefixes(self):
self.task_keyprefix = self.key_t(self.task_keyprefix)
self.group_keyprefix = self.key_t(self.group_keyprefix)
self.chord_keyprefix = self.key_t(self.chord_keyprefix)
def get(self, key):
raise NotImplementedError('Must implement the get method.')
def mget(self, keys):
raise NotImplementedError('Does not support get_many')
def _set_with_state(self, key, value, state):
return self.set(key, value)
def set(self, key, value):
raise NotImplementedError('Must implement the set method.')
def delete(self, key):
raise NotImplementedError('Must implement the delete method')
def incr(self, key):
raise NotImplementedError('Does not implement incr')
def expire(self, key, value):
pass
def get_key_for_task(self, task_id, key=''):
"""Get the cache key for a task by id."""
if not task_id:
raise ValueError(f'task_id must not be empty. Got {task_id} instead.')
return self._get_key_for(self.task_keyprefix, task_id, key)
def get_key_for_group(self, group_id, key=''):
"""Get the cache key for a group by id."""View on GitHub (pinned to 571efe8120)
When it happens
Trigger: Thrown at celery/backends/base.py:1011 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of celery/celery@571efe8120 (2026-08-04).
Data as JSON: /data/errors/7acdf1d88cd8908c.json.
Report an issue: GitHub.