Question

How to setup channel on droplet without running into the error Cannot import ASGI_APPLICATION module

I have been trying for the past two weeks now to host my web app on digital oceans droplet cloud server , after I had successfully uploaded all the files of my Django app to the droplet cloud server, I can’t seem to figure how to run the app without running into this exception ImproperlyConfigured: Cannot import ASGI_APPLICATION module, In my development environment every thing seems to work without any problem but when uploaded on the ubuntu droplet I keep getting the above error, I have down-grade my Django from 3.1 to 2.5.1 as a solution on stack was suggested but it didn’t work and also I tried other suggestions of importing the application in the routing file as another solution but the problem seem to persist! Am really getting stressed since it has been almost two week on trying to hunt the bug, and I have tried other methods suggested on stack ! As I mentioned that am only having this issue in my production environment. What can possible be the course ?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @umarfarukabu,

It seems to me like you are not importing or the module that you are trying to import is not available. Try to see if everything between your dev and prod environment is the same. By everything, I mean Python modules, Python versions, Django versions so on and so fort.