redis/redis-py · error · RedisError
To configure maintenance notifications, a parser must be…
Error message
To configure maintenance notifications, a parser must be provided!
What it means
RedisError from AbstractConnection._configure_maintenance_notifications (redis/asyncio/connection.py:244) when the method is called with no parser argument. Maintenance notifications require a parser instance to attach a push handler to; omitting it is an internal programming error, not something an end user triggers directly.
Solutions
- Pass the active parser instance when invoking _configure_maintenance_notifications
- Avoid subclassing connection internals; use the public configuration options instead
- If you hit this from library code, upgrade redis-py
Defensive patterns
Strategy: validation
Validate before calling
# internal API; callers cannot trigger. If subclassing, always pass parser= into _configure_maintenance_notifications.
Prevention
- Do not subclass connection internals without passing the parser
- Prefer public configuration options over internal hooks
When it happens
Trigger: Internal/pool code calling _configure_maintenance_notifications without passing parser=; subclassing the connection and overriding the pool handler wiring incorrectly.
Common situations: Custom connection subclasses; bugs in pool handler delegation paths.
Related errors
- Cannot enable maintenance notifications for connection…
- Maintenance notifications are only supported with hiredis…
- The server doesn't support maintenance notifications
- To configure maintenance notifications, a parser must be…
- Bad response from PING health check
AI-assisted analysis of redis/redis-py@6a6b581b48 (2026-08-10).
Data as JSON: /api/errors/e783baa098b84f40.
Report an issue: GitHub.
Appendix: source
Thrown at redis/asyncio/connection.py:245
orig_host_address: str | None = None,
orig_socket_timeout: float | None = None,
orig_socket_connect_timeout: float | None = None,
oss_cluster_maint_notifications_handler: (
AsyncOSSMaintNotificationsHandler | None
) = None,
parser: BaseParser | None = None,
) -> None:
if (
not self.maint_notifications_config
or not self.maint_notifications_config.enabled
):
self._maint_notifications_pool_handler = None
self._maint_notifications_connection_handler = None
self._oss_cluster_maint_notifications_handler = None
return
if not parser:
raise RedisError(
"To configure maintenance notifications, a parser must be provided!"
)
if not isinstance(parser, _AsyncHiredisParser) and not isinstance(
parser, _AsyncRESP3Parser
):
raise RedisError(
"Maintenance notifications are only supported with hiredis and RESP3 parsers!"
)
if maint_notifications_pool_handler:
# Extract a reference to a new pool handler that copies all properties
# of the original one and has a different connection reference
# This is needed because when we attach the handler to the parser
# we need to make sure that the handler has a reference to the
# connection that the parser is attached to.
self._maint_notifications_pool_handler = (
maint_notifications_pool_handler.get_handler_for_connection()View on GitHub (pinned to 6a6b581b48)