'Django Channel - Redis integration error : aioredis.errors.ReplyError: ERR unknown command 'EVAL'

I am new to Django channels and following the tutorial ( https://channels.readthedocs.io/en/latest/tutorial/part_2.html)

As Redis does not support Windows 7 I downloaded Redis version 2.4 from (https://github.com/dmajkic/redis/downloads)

When I try to access the Redis from Django shell I got error as mentioned in the subject.

$ python3 manage.py shell
>>> import channels.layers
>>> channel_layer = channels.layers.get_channel_layer()
>>> from asgiref.sync import async_to_sync
>>> async_to_sync(channel_layer.send)('test_channel', {'type': 'hello'})
>>> async_to_sync(channel_layer.receive)('test_channel')      # ERROR OCCURED AFTER THIS STEP

As you can see below, the Redis folder , it start dev server at port 6379. enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source