{"id":"2c74d2533ca53d05","repo":"redis/redis-py","slug":"command-info-is-intentionally-not-implemented-in-t","errorCode":null,"errorMessage":"COMMAND INFO is intentionally not implemented in the client.","messagePattern":"COMMAND INFO is intentionally not implemented in the client\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"redis/commands/core.py","lineNumber":1315,"sourceCode":"    def command(self: SyncClientProtocol, **kwargs) -> dict[str, dict[str, Any]]: ...\n\n    @overload\n    def command(\n        self: AsyncClientProtocol, **kwargs\n    ) -> Awaitable[dict[str, dict[str, Any]]]: ...\n\n    def command(\n        self, **kwargs\n    ) -> dict[str, dict[str, Any]] | Awaitable[dict[str, dict[str, Any]]]:\n        \"\"\"\n        Returns dict reply of details about all Redis commands.\n\n        For more information, see https://redis.io/commands/command\n        \"\"\"\n        return self.execute_command(\"COMMAND\", **kwargs)\n\n    def command_info(self, **kwargs) -> None:\n        raise NotImplementedError(\n            \"COMMAND INFO is intentionally not implemented in the client.\"\n        )\n\n    @overload\n    def command_count(self: SyncClientProtocol, **kwargs) -> int: ...\n\n    @overload\n    def command_count(self: AsyncClientProtocol, **kwargs) -> Awaitable[int]: ...\n\n    def command_count(self, **kwargs) -> int | Awaitable[int]:\n        return self.execute_command(\"COMMAND COUNT\", **kwargs)\n\n    @overload\n    def command_list(\n        self: SyncClientProtocol,\n        module: str | None = None,\n        category: str | None = None,\n        pattern: str | None = None,","sourceCodeStart":1297,"sourceCodeEnd":1333,"githubUrl":"https://github.com/redis/redis-py/blob/da03cdc7e8731092b13e395605c3c1fb2de25de1/redis/commands/core.py#L1297-L1333","documentation":"command_info is a stub that always raises NotImplementedError. redis-py intentionally does not implement COMMAND INFO as a client method; it is available via the generic execute_command('COMMAND', 'INFO', ...) escape hatch if needed. This is by design, not a bug.","triggerScenarios":"Calling r.command_info() directly. Auto-discovering methods on a client object and invoking command_info. Copying from redis-cli usage where COMMAND INFO is a normal command.","commonSituations":"Developer expects a 1:1 mapping between redis-cli commands and python methods. IDE autocomplete suggests command_info but it raises. Building a command-metadata tool and calling the obvious method name.","solutions":["Use r.execute_command('COMMAND', 'INFO', *command_names) to call it directly on the wire.","Use r.command() for full command metadata, or r.command_list() for the command list.","If you only need the count of commands, use r.command_count()."],"exampleFix":"# before\nr.command_info('GET', 'SET')\n# after\nr.execute_command('COMMAND', 'INFO', 'GET', 'SET')","handlingStrategy":"fallback","validationCode":"# check before calling — command_info is always a stub\nimport inspect\nif 'NotImplementedError' in inspect.getsource(type(r).command_info):\n    result = r.execute_command('COMMAND', 'INFO', 'GET')","typeGuard":null,"tryCatchPattern":"try:\n    r.command_info()\nexcept NotImplementedError:\n    r.execute_command('COMMAND', 'INFO', *cmds)","preventionTips":["Prefer execute_command() for any COMMAND subcommand not exposed as a dedicated method.","command_info/command_docs are intentional stubs — don't rely on them."],"tags":["not-implemented","command-introspection","api-gap"],"analyzedSha":"da03cdc7e8731092b13e395605c3c1fb2de25de1","analyzedAt":"2026-08-04T20:26:47.563Z","schemaVersion":2}