I’ve installed Redis 3.0.54
.
Django is updated.
I’m learning channels from the tutorial page.
This is my terminal window for redis-cli and redis server
Image of Terminal
System check identified no issues (0 silenced).
August 06, 2020 - 16:04:58
Django version 3.1, using settings 'mysite.settings'
Starting ASGI/Channels version 2.4.0 development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
HTTP GET /chat/lobby/ 200 [0.02, 127.0.0.1:60841]
WebSocket HANDSHAKING /ws/chat/lobby/ [127.0.0.1:60843]
WebSocket CONNECT /ws/chat/lobby/ [127.0.0.1:60843]
Exception inside application: ERR unknown command 'BZPOPMIN'
Traceback (most recent call last):
File "C:Users\Envspy2libsite-packageschannelssessions.py", line 183, in __call__
return await self.inner(receive, self.send)
File "C:Users\Envspy2libsite-packageschannelsmiddleware.py", line 41, in coroutine_call
await inner_instance(receive, send)
File "C:Users\Envspy2libsite-packageschannelsconsumer.py", line 59, in __call__
[receive, self.channel_receive], self.dispatch
File "C:Users\Envspy2libsite-packageschannelsutils.py", line 58, in await_many_dispatch
await task
File "C:Users\Envspy2libsite-packageschannelsutils.py", line 50, in await_many_dispatch
result = task.result()
File "C:Users\Envspy2libsite-packageschannels_rediscore.py", line 453, in receive
real_channel
File "C:Users\Envspy2libsite-packageschannels_rediscore.py", line 508, in receive_single
index, channel_key, timeout=self.brpop_timeout
File "C:Users\Envspy2libsite-packageschannels_rediscore.py", line 345, in _brpop_with_clean
result = await connection.bzpopmin(channel, timeout=timeout)
aioredis.errors.ReplyError: ERR unknown command 'BZPOPMIN'
WebSocket DISCONNECT /ws/chat/lobby/ [127.0.0.1:60843]
2
Answers
BZPOPMIN and BZPOPMAX(also non-blocking versions
ZPOPMIN
andZPOPMAX
) are "Available since 5.0.0". You need to upgrade your redis to at least version 5 to use them, since you use version 3.0.54.You may check download page for available versions and instructions to download them.
download the latest version of Redis from here and try it will work
https://github.com/tporadowski/redis/releases