diff --git a/redisgraph/graph.py b/redisgraph/graph.py index f4d802f..7653645 100644 --- a/redisgraph/graph.py +++ b/redisgraph/graph.py @@ -177,6 +177,9 @@ def query(self, q, params=None, timeout=None, read_only=False): except redis.exceptions.ResponseError as e: if "wrong number of arguments" in str(e): print("Note: RedisGraph Python requires server version 2.2.8 or above") + if "unknown command" in str(e) and read_only: + # `GRAPH.RO_QUERY` is unavailable in older versions. + return self.query(q, params, timeout, read_only=False) raise e except VersionMismatchException as e: # client view over the graph schema is out of sync