redis/redis-py · error · 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
Raised by memory_help() (redis/commands/core.py:1877) which is a stub that unconditionally raises NotImplementedError. MEMORY HELP prints CLI help text and has no programmatic value, so the python client refuses it. No arguments are accepted.
Solutions
- Consult https://redis.io/commands/#memory for the MEMORY command list
- Call the implemented memory_* methods directly (memory_stats, memory_usage, memory_purge)
- If you must: r.execute_command("MEMORY", "HELP")
Example fix
# before r.memory_help() # after # (remove; no programmatic equivalent needed) r.memory_stats()
Defensive patterns
Strategy: fallback
Validate before calling
# memory_help() is intentionally unimplemented; no programmatic equivalent needed # enumerate supported methods instead
Try / catch
try:
r.memory_help()
except NotImplementedError:
pass # nothing useful to do Prevention
- Do not call memory_help(); it returns CLI help text.
- Reference the redis.io docs for the MEMORY command surface.
- Use the implemented memory_* methods directly.
When it happens
Trigger: Calling r.memory_help(). Any call raises immediately.
Common situations: Auto-discovering MEMORY subcommands; assuming a 1:1 mirror of the CLI surface.
Related errors
- MEMORY DOCTOR is intentionally not implemented in the…
- COMMAND DOCS is intentionally not implemented in the client.
- COMMAND INFO is intentionally not implemented in the client.
- DEBUG SEGFAULT is intentionally not implemented in the…
- FAILOVER is intentionally not implemented in the client.
AI-assisted analysis of redis/redis-py@6a6b581b48 (2026-08-10).
Data as JSON: /api/errors/e6c63f36928672ee.
Report an issue: GitHub.
Appendix: 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 6a6b581b48)