0

I have a redis server with authentication password containing =, and ?. Meanwhile I am using the Location scheme as redis://[:password]@localhost:6397.

Config:

'default': {
   'BACKEND': 'django_redis.cache.RedisCache',
   'LOCATION': 'redis://:6?V4=434#ef4@localhost:6379/1',
   'OPTIONS': {
       'CLIENT_CLASS': 'django_redis.client.DefaultClient',
   }
},

I always get an error TypeError: __init__() got an unexpected keyword argument 'V4'. Somehow the Location scheme string doesnt count for cases where password have =, and ? in certain order, such that it thinks it is separators in the scheme. I tried to escape the special characters : 6\?V4\=434#ef4 but it gave me different error: ValueError: Port could not be cast to integer value as '6\\'

Can this be solved without moving password in OPTIONS ?

Badr
  • 694
  • 1
  • 7
  • 26

0 Answers0