ERROR: object.__init__() takes no parameters
See original GitHub issueHello guys when I try to open connection from my frontend to my socket this error I get can you help me?
2020-12-05 15:00:37,612 ERROR    Exception inside application: object.__init__() takes no parameters
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/channels/routing.py", line 71, in __call__
    return await application(scope, receive, send)
  File "/usr/local/lib/python3.6/site-packages/channels/sessions.py", line 47, in __call__
    return await self.inner(dict(scope, cookies=cookies), receive, send)
  File "/usr/local/lib/python3.6/site-packages/channels/sessions.py", line 254, in __call__
    return await self.inner(wrapper.scope, receive, wrapper.send)
  File "/usr/local/lib/python3.6/site-packages/channels/auth.py", line 181, in __call__
    return await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.6/site-packages/channels/middleware.py", line 26, in __call__
    return await self.inner(scope, receive, send)
  File "/usr/local/lib/python3.6/site-packages/channels/routing.py", line 160, in __call__
    send,
  File "/usr/local/lib/python3.6/site-packages/asgiref/compatibility.py", line 33, in new_application
    instance = application(scope)
  File "/usr/local/lib/python3.6/site-packages/channels/generic/websocket.py", line 159, in __init__
    super().__init__(*args, **kwargs)
TypeError: object.__init__() takes no parameters
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (3 by maintainers)
 Top Results From Across the Web
Top Results From Across the Web
Python inheritance: TypeError: object.__init__() takes no ...
Essentially what you are resolving to is the __init__ of the object base class which takes no params. Its a bit redundant, I...
Read more >TypeError: object.__init__() takes no parameters - Python
I'm having trouble a TypeError. Whenever I create a new HighSchool object I get the error: “TypeError: object.init() takes no parameters”.
Read more >Python inheritance TypeError object init takes no parameters
I get this error: TypeError: object.__init__() takes no parameters. when running my code, I don't really see what I'm doing wrong here ...
Read more >TypeError: object.__init__() takes no parameters - menno.io
__init__ no longer take arguments - a TypeError is raised when arguments are passed. To avoid breaking too much pre-existing code, there is...
Read more >TypeError: Class() takes no arguments in Python
To solve the error, make sure to define the `__init__()` (two ... The Python "TypeError: Class() takes no arguments" occurs when we forget ......
Read more > Top Related Medium Post
Top Related Medium Post
No results found
 Top Related StackOverflow Question
Top Related StackOverflow Question
No results found
 Troubleshoot Live Code
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free Top Related Reddit Thread
Top Related Reddit Thread
No results found
 Top Related Hackernoon Post
Top Related Hackernoon Post
No results found
 Top Related Tweet
Top Related Tweet
No results found
 Top Related Dev.to Post
Top Related Dev.to Post
No results found
 Top Related Hashnode Post
Top Related Hashnode Post
No results found

I had the same issue, though found this article that basically stated update routing.py to add .as_asgi() to my consumer consumers.LivePostConsumer.as_asgi()),
It is to be fixed here:
channels.testing.websocket.WebsocketCommunicatorScope should not be passed as described in the release notes: https://channels.readthedocs.io/en/latest/releases/3.0.0.html