Reputation: 21
I am very interested in the idea to write a chat application. I've recently come across great tutorial at https://channels.readthedocs.io/en/latest/index.html using DjangoChannels All understood, wrote my own one (suppose the same as there), everything is working. However, I ran into a problem: when updating the chat page, the server throws this exception (and after that I can't send messages, so that's quite harmful):
Exception in callback AsyncioSelectorReactor.callLater.<locals>.run() at /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/twisted/internet/asyncioreactor.py:287
handle: <TimerHandle when=53.716773429 AsyncioSelectorReactor.callLater.<locals>.run() at /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/twisted/internet/asyncioreactor.py:287>
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/twisted/internet/asyncioreactor.py", line 290, in run
f(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/daphne/server.py", line 229, in application_checker
exception = application_instance.exception()
asyncio.exceptions.CancelledError
(I am using WebsocketConsumer
, python 3.8.2)
Actually, I suppose there is a problem with the disconnection with the server when updating the page. I tried to solve it myself but unfortunately didn't succeed :( Could anybody please help me?
Upvotes: 2
Views: 547
Reputation: 3433
I've solved the problem updating my Redis server and dependencies. My final versions are:
channels==2.4.0
channels-redis==3.1.0
daphne==2.5.0
Django==3.1.2
django-filter==2.4.0
djangorestframework==3.12.1
There are some issues where a few users offer different solutions: link 1, link 2. Maybe you can find updates about this problem there.
Upvotes: 1