redis/redis-py · info · NotImplementedError
MEMORY HELP is intentionally not implemented in the client.
Error message
MEMORY HELP is intentionally not implemented in the client. For more information, see https://redis.io/commands/memory-help
What it means
memory_help is a stub that always raises NotImplementedError. MEMORY HELP prints usage help to the redis-cli console; it has no value in a programmatic client, so redis-py does not implement it.
Source
Thrown at redis/commands/core.py:1877
def object(self, infotype: str, key: KeyT, **kwargs) -> Any | Awaitable[Any]:
"""
Return the encoding, idletime, or refcount about the key
"""
return self.execute_command(
"OBJECT", infotype, key, infotype=infotype, **kwargs
)
def memory_doctor(self, **kwargs) -> None:
raise NotImplementedError(
"""
MEMORY DOCTOR is intentionally not implemented in the client.
For more information, see https://redis.io/commands/memory-doctor
"""
)
def memory_help(self, **kwargs) -> None:
raise NotImplementedError(
"""
MEMORY HELP is intentionally not implemented in the client.
For more information, see https://redis.io/commands/memory-help
"""
)
@overload
def memory_stats(self: SyncClientProtocol, **kwargs) -> dict[str, Any]: ...
@overload
def memory_stats(
self: AsyncClientProtocol, **kwargs
) -> Awaitable[dict[str, Any]]: ...
def memory_stats(self, **kwargs) -> dict[str, Any] | Awaitable[dict[str, Any]]:
"""
Return a dictionary of memory statsView on GitHub (pinned to da03cdc7e8)
Solutions
- Consult the Redis documentation for MEMORY command usage.
- Use r.execute_command('MEMORY', 'HELP') only if you want the raw help text.
- Use the real memory methods: memory_stats, memory_usage, memory_purge.
Example fix
# before r.memory_help() # after r.memory_stats() # structured memory statistics
Defensive patterns
Strategy: fallback
Try / catch
try:
r.memory_help()
except NotImplementedError:
r.memory_stats() Prevention
- memory_help is console help text — remove calls to it.
- Use the Redis docs or memory_stats for real memory information.
When it happens
Trigger: Calling r.memory_help(). Auto-discovering memory_* methods and invoking memory_help.
Common situations: Developer expects programmatic help text. Enumerating all MEMORY subcommands. IDE autocomplete suggests the method.
Related errors
- MEMORY DOCTOR is intentionally not implemented in the client
- COMMAND INFO is intentionally not implemented in the client.
- COMMAND DOCS is intentionally not implemented in the client.
- LATENCY DOCTOR is intentionally not implemented in the clien
- LATENCY GRAPH is intentionally not implemented in the client
AI-assisted analysis of redis/redis-py@da03cdc7e8 (2026-08-04).
Data as JSON: /data/errors/e6c63f36928672ee.json.
Report an issue: GitHub.