I am facing the following error message on my Django application:
Exception inside application: 'Redis' object has no attribute 'bzpopmin'
Traceback (most recent call last):
File "/home/jack/.conda/envs/GuessWhich/lib/python3.7/site-packages/channels/staticfiles.py", line 44, in __call__
return await self.application(scope, receive, send)
File "/home/jack/.conda/envs/GuessWhich/lib/python3.7/site-packages/channels/routing.py", line 71, in __call__
return await application(scope, receive, send)
File "/home/jack/.conda/envs/GuessWhich/lib/python3.7/site-packages/channels/sessions.py", line 47, in __call__
return await self.inner(dict(scope, cookies=cookies), receive, send)
File "/home/jack/.conda/envs/GuessWhich/lib/python3.7/site-packages/channels/sessions.py", line 254, in __call__
return await self.inner(wrapper.scope, receive, wrapper.send)
File "/home/jack/.conda/envs/GuessWhich/lib/python3.7/site-packages/channels/auth.py", line 181, in __call__
return await super().__call__(scope, receive, send)
File "/home/jack/.conda/envs/GuessWhich/lib/python3.7/site-packages/channels/middleware.py", line 26, in __call__
return await self.inner(scope, receive, send)
File "/home/jack/.conda/envs/GuessWhich/lib/python3.7/site-packages/channels/routing.py", line 160, in __call__
send,
File "/home/jack/.conda/envs/GuessWhich/lib/python3.7/site-packages/channels/consumer.py", line 94, in app
return await consumer(scope, receive, send)
File "/home/jack/.conda/envs/GuessWhich/lib/python3.7/site-packages/channels/consumer.py", line 59, in __call__
[receive, self.channel_receive], self.dispatch
File "/home/jack/.conda/envs/GuessWhich/lib/python3.7/site-packages/channels/utils.py", line 58, in await_many_dispatch
await task
File "/home/jack/.conda/envs/GuessWhich/lib/python3.7/site-packages/channels/utils.py", line 50, in await_many_dispatch
result = task.result()
File "/home/jack/.conda/envs/GuessWhich/lib/python3.7/site-packages/channels_redis/core.py", line 469, in receive
real_channel
File "/home/jack/.conda/envs/GuessWhich/lib/python3.7/site-packages/channels_redis/core.py", line 524, in receive_single
index, channel_key, timeout=self.brpop_timeout
File "/home/jack/.conda/envs/GuessWhich/lib/python3.7/site-packages/channels_redis/core.py", line 361, in _brpop_with_clean
result = await connection.bzpopmin(channel, timeout=timeout)
AttributeError: 'Redis' object has no attribute 'bzpopmin'
This seems to be after a WebSocket connection is created with the WebSocket disconnecting after the error is thrown.
At first I looked at other similar issues that were caused by using a version of Redis lower than 5.0 but after entering the command redis-cli INFO | grep version
I can see the version of Redis installed on my machine is 6.0.9
which also applies when calling a similar function from within Python.
At this point I think the issue could be due to an independent version of Redis running (perhaps from some other dependency?) but I cannot find evidence of this on my machine, or due to upgrading the version of channels from 1 to 3 and leaving behind some legacy code. I have not been successful in finding any similar issues to the one I am facing and not sure if either of these hypothesises are correct.