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
When running, I receive the following error: AttributeError: type object 'Redis' has no attribute 'from_url'
The code is working when I'm inheriting from redis-py Redis class.
The problem is probably with the 'getattr' method which only works for non-class methods
The text was updated successfully, but these errors were encountered:
I have the following code which supposes to create a new Redis client based on the from_url class method, which is supported by redis-py
`
import retry_redis
class Redis(retry_redis.Redis):
def new(cls, *args, **kwargs):
redis_client = retry_redis.Redis.from_url('http://my-url' )
return redis_client
`
When running, I receive the following error:
AttributeError: type object 'Redis' has no attribute 'from_url'
The code is working when I'm inheriting from redis-py Redis class.
The problem is probably with the 'getattr' method which only works for non-class methods
The text was updated successfully, but these errors were encountered: