Re: channels/asgi 3.x imcompatibility with the code on 2.x versions

2021-12-02 Thread Zhaoxun Yan
So far as our code and the code of another user, we have passed self as the first argument in the definition of a function/method. relating code in consumers.py: from channels.generic.websocket import AsyncWebsocketConsumer import json class Trade(AsyncWebsocketConsumer): async def my_send(se

Re: channels/asgi 3.x imcompatibility with the code on 2.x versions

2021-11-30 Thread Bernard Mallala
This kind of error happens when working with classes. When you create methods for a class, you must always pass self as the first argument self designates the object in which it is called. You have to pass self as the first argument for each method. Does this help ? On Tuesday, November 30, 2021

channels/asgi 3.x imcompatibility with the code on 2.x versions

2021-11-30 Thread Zhaoxun Yan
Hi there! I have posted this issue like 3 months ago. https://github.com/django/channels/discussions/1736 And there are many others encountering similar problem, like this: https://stackoverflow.com/questions/68194577/typeerror-call-missing-1-required-positional-argument-send-django/ The similar