ImportError: No module named 'asgiref.base_layer'

3k views Asked by At

I was trying django channel example from https://blog.heroku.com/in_deep_with_django_channels_the_future_of_real_time_apps_in_django but it throws error when i run command daphne chat.asgi:channel_layer --port 8888 that ImportError: No module named 'asgiref.base_layer'. I already installed all packages which is required for this example.Below is my requirements.txt file

asgi-redis==0.13.1
asgiref==0.9
autobahn==0.12.1
channels==0.16.1
daphne==0.9.1
dj-database-url==0.4.0
Django==1.9.7
haikunator==1.0.1
msgpack-python==0.4.7
psycopg2==2.6.1
redis==2.10.5
six==1.10.0
Twisted==16.2.0
txaio==2.2.1
wheel==0.24.0
zope.interface==4.1.3

I am using redis-server 3.2.6 and python 3.5.2

1

There are 1 answers

0
Ashley 'CptLemming' Wilson On BEST ANSWER

You have a newer version of channels installed than the article uses, but an older version of asgiref. Try updating to the latest version asgiref==1.0.0 to fix our issue.