Skip to content

Latest Sentry SDK 1.31.1 not compatible with latest Quart 0.19.2 #2406

Closed

Description

@larsblumberg

How do you use Sentry?

Sentry Saas (sentry.io)

Version

1.31.1

Steps to Reproduce

  1. requirements.txt:
Quart==0.19.2
sentry-sdk[quart]==1.31.1
  1. pip3 install && python3 ...

raises sentry_sdk.integrations.DidNotEnable: Quart is not installed:

    try:                                   
        from quart import (  # type: ignore 
            has_request_context,
            has_websocket_context,
            Request,                       
            Quart,                         
            request,                       
            websocket,
        )                                  
        from quart.scaffold import Scaffold  # type: ignore
        from quart.signals import (  # type: ignore
            got_background_exception,
            got_request_exception,
            got_websocket_exception,
            request_started,
            websocket_started,
        )                                  
        from quart.utils import is_coroutine_function  # type: ignore
    except ImportError:
>       raise DidNotEnable("Quart is not installed")
E       sentry_sdk.integrations.DidNotEnable: Quart is not installed

/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/quart.py:51: DidNotEnable

Expected Result

No import errors and quart SDK detected.

Actual Result

Import error leading to quart not being detected.

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀on Oct 3, 2023
  2. changed the title [-]Latest Sentry 1.31.1 not compatible with latest Quart 0.19.2[/-] [+]Latest Sentry SDK 1.31.1 not compatible with latest Quart 0.19.2[/+] on Oct 3, 2023
  3. linked a pull request that will close this issueSupport Quart 0.19 onwards #2403on Oct 3, 2023
  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀on Oct 3, 2023
  5. sentrivana commented on Oct 3, 2023

    @sentrivana
    Collaborator

    Hey @larsblumberg, thanks for reporting this! It seems someone has already opened a PR for this, I'll block some time to give it a look in the coming week.

  6. self-assigned this
    on Oct 3, 2023
  7. catwell commented on Oct 12, 2023

    @catwell

    For what it's worth that someone is the author of Quart :)

  8. moved this to Waiting for: Product Owner in GitHub Issues with 👀on Oct 12, 2023
  9. rubiali commented on Oct 13, 2023

    @rubiali

    I have the solution
    pip install --upgrade 'sentry-sdk[flask]' # Quart is supported by the Flask SDK so..
    import sentry_sdk
    from quart import Quart
    from sentry_sdk.integrations.flask import FlaskIntegration

    sentry_sdk.init(
    dsn="YOUR_SENTRY_DSN",
    integrations=[FlaskIntegration()],
    )

    app = Quart(name)

    obs: in integrations you utilize FlaskIntegration(), that's worked for me

  10. sentrivana commented on Oct 13, 2023

    @sentrivana
    Collaborator

    Hey all, support for Quart>=0.19 will be out with the next release in a couple of weeks. Thanks to Quart's maintainer @pgjones for making our integration compatible with the newest Quart!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions