You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if self.db:
await self.send_command(b"SELECT", self.db)
if await self.read_response() != b"OK":
raise ConnectionError("Invalid Database")
But if we add the decode=False parameter or compare it with "OK", the connection will be successful.
await self.read_response() actually return 'OK'.
I initialize ConnectionPool with the parameters decode_responses=True, encoding='utf-8' and db=1. Then I get a connection using the get_connection method and try to connect. If I remove decode_responses, the connection will also be successful.
I'm using python 3.10.2 with coredis==3.4.1
redis_version:5.0.4
The text was updated successfully, but these errors were encountered:
Connection Error("Invalid Database") raised if the db and decode_responses=True parameters is specified.
connection.py
But if we add the decode=False parameter or compare it with "OK", the connection will be successful.
await self.read_response() actually return 'OK'.
I initialize ConnectionPool with the parameters decode_responses=True, encoding='utf-8' and db=1. Then I get a connection using the get_connection method and try to connect. If I remove decode_responses, the connection will also be successful.
I'm using python 3.10.2 with coredis==3.4.1
redis_version:5.0.4
The text was updated successfully, but these errors were encountered: