raven-python icon indicating copy to clipboard operation
raven-python copied to clipboard

object of type 'DjangoClient' has no len()

Open jleclanche opened this issue 7 years ago • 3 comments

Getting this on AWS Lambda with Python 3.6 runtime:

Traceback (most recent call last):
File "/var/task/hsreplaynet/utils/instrumentation.py", line 112, in wrapper
if sentry:
File "/var/task/raven/contrib/django/models.py", line 69, in <lambda>
__len__ = lambda x: len(get_client())
TypeError: object of type 'DjangoClient' has no len()

That if sentry is doing a bool() on a raven.contrib.django.raven_compat.models.client object. This works fine on 2.7, not on 3.6 which calls __len__ when defined (and it is defined here).

jleclanche avatar Jun 25 '17 13:06 jleclanche

Problem still exists in raven 6.9.0

GrigoriyMikhalkin avatar Aug 17 '18 14:08 GrigoriyMikhalkin

Problem still exists in raven 6.10.0

xnightsky avatar Aug 20 '19 14:08 xnightsky

Is this bug being worked on?

MartinFalatic avatar Oct 25 '19 17:10 MartinFalatic