I have followed the channels tutorial but while running these error throw
Version of the packages is channels==2.1.2 Django==2.0.4<
When importing your app with absolute path in myapp/routing make sure it is imported like:
import myapp.routing
from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter
import myapp.routing
application = ProtocolTypeRouter({
# (http->django views is added by default)
'websocket': AuthMiddlewareStack(
URLRouter(
myapp.routing.websocket_urlpatterns
)
),
})
It may give you warning as error in PyCharm but you will have working Django channels. I reported it as bug to PyCharm. I hope no one else will spend 3-4 hours on it like me)