#π Users may not be connecting to the same websocket - django channels
20 messages Β· Page 1 of 1 (latest)
@coral atlas
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
How are you running your webserver?
FYI paste supports multiple files so you don't have to mash all three of your files into one
You also cut off your imports
Paste the shell command
To run your server you have to type some shell command
Hmm
Have you got a new paste with the files separately and showing imports?
Oh you do brilliant I see it now
What channel layer are you using?
I don't think that works with runserver
You need to use the Redis one or run your server with Uvicorn/hypercorn
Oh yeah I forgot about Daphne
I think you're running into this https://forum.djangoproject.com/t/adding-asgi-support-to-runserver/2446/31
I still donβt get what the current way to get asgi from Django runserver to run is? I have a websocket which doesnβt work when I use runserver, the ideal solution where you can just add --asgi to runserver seemed really nice or even just make it work built in. It seems like people thought a lot about this topic and in the end nothing came from i...
You'll probably want to switch to the Redis channel layer anyways
What's the output of python manage.py runserver?
Oh hmmm that's supposed to be working then
You might need to ask on the Django discord
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.