I am trying to set up django channels for a chat feature in my web app but i am getting DLL import error

206 Views Asked by At

File "C:\Users\user.virtualenvs\cinemahub-_4auLGIo\lib\site-packages\cryptography\exceptions.py", line 9, in from cryptography.hazmat.bindings._rust import exceptions as rust_exceptions ImportError: DLL load failed while importing _rust: The specified procedure could not be found.

I uninstalled channels 3.0.5 and run python manage.py, the error disappeared. but the Asgi server wasnt showing on terminal. I installed channels 4.0.0 and Daphne but daphne causes the same error however when i remove daphne, the error disappears. I want the asgi server to show on the terminal. I aslo installed and uninstalled cryptography numerous times yet error still appears

2

There are 2 best solutions below

2
Mani A On
pip install channels
pip install asgi_redis
pip install daphne
0
mustafa.m On

If adding daphne to INSTALLED_APPS causing this error, then make sure you add daphne to the top of INSTALLED_APPS as instructed by channels official docs:

In order to solve such issues, make sure daphne is at the top of your INSTALLED_APPS or remove the offending app altogether.