Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot import ASGI_APPLICATION module 'myproject.routing'

I've followed the channels 2 tutorial, but I'm getting this error after running py manage.py runserver

File "C:\Users\Mach2\AppData\Local\Programs\Python\Python37-32\lib\site-packages\channels\routing.py", line 35, in get_default_application
    raise ImproperlyConfigured("Cannot import ASGI_APPLICATION module %r" % path)
django.core.exceptions.ImproperlyConfigured: Cannot import ASGI_APPLICATION module 'channels_test.routing'
like image 352
Yassine Alikhbari Avatar asked Mar 20 '26 19:03

Yassine Alikhbari


1 Answers

You need to add this line to settings.py file.

ASGI_APPLICATION = "routing.application"

found here: Cannot import ASGI_APPLICATION module while runserver using channels 2

like image 54
Diogo Rosa Avatar answered Mar 22 '26 09:03

Diogo Rosa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!