При подключении к сокету, выдает следующую ошибку:
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
November 03, 2020 - 07:02:03
Django version 3.1.3, using settings 'my_chat.settings'
Starting ASGI/Channels version 3.0.0 development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
WebSocket HANDSHAKING /ws/chat/ [127.0.0.1:43390]
Exception inside application: object.__init__() takes exactly one argument (the instance to initialize)
Traceback (most recent call last):
File "/home/sus/Desktop/test/env/lib/python3.8/site-packages/channels/routing.py", line 71, in __call__
return await application(scope, receive, send)
File "/home/sus/Desktop/test/env/lib/python3.8/site-packages/channels/routing.py", line 150, in __call__
return await application(
File "/home/sus/Desktop/test/env/lib/python3.8/site-packages/asgiref/compatibility.py", line 33, in new_application
instance = application(scope)
File "/home/sus/Desktop/test/env/lib/python3.8/site-packages/channels/generic/websocket.py", line 23, in __init__
super().__init__(*args, **kwargs)
TypeError: object.__init__() takes exactly one argument (the instance to initialize)
WebSocket DISCONNECT /ws/chat/ [127.0.0.1:43390]
Сначала писал код по документации, он не заработал с этой ошибкой.
Попробовал запустить уже готовый отсюда
https://github.com/webmagicc/my_chat/tree/29ee154d..., ошибка сохранилась.