Hi, I’ve been trying to deploy a django asgi webapp but at the end of the process it shows the following message:
ImportError: cannot import name ‘DEFAULT_CHANNEL_LAYER’ from ‘channels’ (/opt/render/project/src/.venv/lib/python3.11/site-packages/channels/init.py)
from what I’ve googled I understand this is related to channels/daphne packages installation, is it? or could be a misconfiguration on setting.py, etc?
Any help on how to solve thi issue will be highly welcomed.
Hey, thanks for your answer. Yes, I did check that github thread. I should’ve pointed out that when I run the app in my local machine in works just fine. But once I try to depoy it on render it throws the error.
Hence I guess there’s something wrong with my deployment on Render. I first deployed the site as wsgi for testing and it worked. Once I changed to asgi this problem occurred.
In case is useful to anyone. It got fixed by uninstalling all channels/daphne/redis libraries on my local machine, reinstall with python -m pip install -U ‘channels[daphne]’ command, and then re deploy.