Skip to content

Error running Django with graphql-ws #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
furious-luke opened this issue Jun 8, 2021 · 3 comments
Closed

Error running Django with graphql-ws #68

furious-luke opened this issue Jun 8, 2021 · 3 comments

Comments

@furious-luke
Copy link

  • GraphQL AioWS version: running off master branch
  • Python version: 3.9.5
  • Operating System: Arch Linux

Description

I'm trying to run a basic Django server with subscriptions enabled and I'm receiving an error on the command line.

What I Did

I prepared a basic Django server, enabled channels, and confirmed everything was working.

I then setup graphql-ws as described in the README. When I launch the server I see the following on the command line (it gets printed repeatedly):

Exception inside application: object.__init__() takes exactly one argument (the instance to initialize)
Traceback (most recent call last):
  File "/home/luke/.cache/pypoetry/virtualenvs/annai-EdSLGIjn-py3.9/lib/python3.9/site-packages/channels/staticfiles.py", line 44, in __call__
    return await self.application(scope, receive, send)
  File "/home/luke/.cache/pypoetry/virtualenvs/annai-EdSLGIjn-py3.9/lib/python3.9/site-packages/channels/routing.py", line 71, in __call__
    return await application(scope, receive, send)
  File "/home/luke/.cache/pypoetry/virtualenvs/annai-EdSLGIjn-py3.9/lib/python3.9/site-packages/channels/routing.py", line 150, in __call__
    return await application(
  File "/home/luke/.cache/pypoetry/virtualenvs/annai-EdSLGIjn-py3.9/lib/python3.9/site-packages/asgiref/compatibility.py", line 33, in new_application
    instance = application(scope)
  File "/home/luke/.cache/pypoetry/virtualenvs/annai-EdSLGIjn-py3.9/lib/python3.9/site-packages/channels/generic/websocket.py", line 159, in __init__
    super().__init__(*args, **kwargs)
TypeError: object.__init__() takes exactly one argument (the instance to initialize)
@fabienheureux
Copy link
Collaborator

Are you using the master branch or 0.3.1 ?
Do you have some more information about the README you used to setup your project ?

@furious-luke
Copy link
Author

Hey @fabienheureux! Please see the associated PR linked above for the fix I used.

@fabienheureux
Copy link
Collaborator

Fixed in 94694e8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants