Django Channels Error - Cannot import BACKEND 'asgi_redis.RedisChannelLayer'

前端 未结 6 1078
面向向阳花
面向向阳花 2021-01-11 12:22

I have installed Django-Channels but while running the daphne-server I am getting this error given below:

File \"/usr/local/lib/python2.7/dist-packages/chann         


        
6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-11 13:06

    Just needed to install 'asgi_redis'. I was assuming that it would have gotten installed by default while installing Django-Channels, but it doesn't. 'asgiref' gets installed by default and not 'asgi_redis'. So to solve this issue, one can just run:

    > sudo pip install asgi_redis
    

提交回复
热议问题