getsentry / raven-python

Raven is the legacy Python client for Sentry (getsentry.com) — replaced by sentry-python
https://sentry.io
BSD 3-Clause "New" or "Revised" License
1.68k stars 657 forks source link

"TypeError: Expected type, got ABCMeta" Flask + Raven + Gevent #1230

Closed shreyanshk closed 6 years ago

shreyanshk commented 6 years ago
from gevent import monkey; monkey.patch_all()
from raven.contrib.flask import Sentry
from flask import Flask

sentry = Sentry()
app = Flask("test")

sentry.init_app(app)

Software: gevent 1.3b1, flask 1.0.1, raven 6.7.0, python 3.6.5 OS: Arch Linux

Traceback (most recent call last):
  File "/tmp/test.py", line 8, in <module>
    sentry.init_app(app)
  File "/home/shreyansh/Projects/shreyanshjain/venv/lib/python3.6/site-packages/raven/contrib/flask.py", line 279, in init_app
    self.client = make_client(self.client_cls, app, self.dsn)
  File "/home/shreyansh/Projects/shreyanshjain/venv/lib/python3.6/site-packages/raven/contrib/flask.py", line 52, in make_client
    'app': app,
  File "/home/shreyansh/Projects/shreyanshjain/venv/lib/python3.6/site-packages/raven/base.py", line 230, in __init__
    self._context = Context(self)
  File "src/gevent/local.py", line 376, in gevent._local.local.__cinit__
  File "src/gevent/local.py", line 542, in gevent._local._local_find_descriptors
TypeError: Expected type, got ABCMeta

Any pointers?

Thank you.