question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exeption using Django+channels ASGI

See original GitHub issue

When I use Django + Channels and ASGI application I got this exception.

Exception inside application: sentry_patched_asgi_handler() takes 3 positional arguments but 4 were given
Traceback (most recent call last):
  File "env/lib/python3.8/site-packages/channels/routing.py", line 71, in __call__
    return await application(scope, receive, send)
TypeError: sentry_patched_asgi_handler() takes 3 positional arguments but 4 were given
HTTP POST /api/v2/auth/login 500 [0.67, 127.0.0.1:37750]

This is my sdk init:

sentry_sdk.init(
    dsn="...",
    integrations=[DjangoIntegration()],
    environment=os.getenv('ENVIRONMENT', "development"),

    # If you wish to associate users to errors (assuming you are using
    # django.contrib.auth) you may enable sending PII data.
    send_default_pii=True
)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dkobiacommented, Mar 3, 2021

Confirmed that the issue is fixed. Currently using 0.20.3.

0reactions
untitakercommented, Nov 11, 2020

@casper936 the problem is fixed in master and will be fixed in 0.19.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting — Channels 4.0.0 documentation
This exception occurs when your application tries to import any models before Django finishes its initialization process aka django.setup() .
Read more >
python - Error when integrating django channels with existing ...
Exception inside application: init() takes 1 positional argument When adding ASGI_APPLICATION in Django 3.1 for channels
Read more >
ASGI errors when deploying Django project for production ...
I want to deploy my django project and I used ASGI server I… ... core/asgi.py", line 12, in <module> from channels.auth import AuthMiddlewareStack...
Read more >
Async in django . Asgi file
Hello . i have created a chat app using django channels and websockets , it is working in development environment nicely without any...
Read more >
Channels Documentation - Read the Docs
with Channels and still usable - with Django's native ASGI support but you can ... not raising this exception - the server will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found