I’m trying to configure my production Django website to use Redis and django.core.cache.backends.redis.RedisCache
, and after wrestling with permissions, I at least got the website to work momentarily. Then I started getting this exception:
'UnixDomainSocketConnection' object has no attribute '_command_packer'
Traceback (most recent call last):
File "[...]lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "[...]lib/python3.10/site-packages/django/utils/deprecation.py", line 135, in __call__
response = self.process_request(request)
File "[...]lib/python3.10/site-packages/django/middleware/cache.py", line 158, in process_request
cache_key = get_cache_key(request, self.key_prefix, "GET", cache=self.cache)
File "[...]lib/python3.10/site-packages/django/utils/cache.py", line 390, in get_cache_key
headerlist = cache.get(cache_key)
File "[...]lib/python3.10/site-packages/django/core/cache/backends/redis.py", line 187, in get
return self._cache.get(key, default)
File "[...]lib/python3.10/site-packages/django/core/cache/backends/redis.py", line 99, in get
value = client.get(key)
File "[...]lib/python3.10/site-packages/redis/commands/core.py", line 1790, in get
return self.execute_command("GET", name)
File "[...]lib/python3.10/site-packages/redis/client.py", line 1258, in execute_command
return conn.retry.call_with_retry(
File "[...]lib/python3.10/site-packages/redis/retry.py", line 46, in call_with_retry
return do()
File "[...]lib/python3.10/site-packages/redis/client.py", line 1259, in <lambda>
lambda: self._send_command_parse_response(
File "[...]lib/python3.10/site-packages/redis/client.py", line 1234, in _send_command_parse_response
conn.send_command(*args)
File "[...]lib/python3.10/site-packages/redis/connection.py", line 916, in send_command
self._command_packer.pack(*args),
Obviously, I’m connecting to Redis through a Unix Domain Socket. I tried a Google search for this error, and the mighty Google search gave zero (0) results. I have no idea what’s going on. I appreciate any assistance.