How do you use Sentry?
Sentry Saas (sentry.io)
Version
2.42.0
Steps to Reproduce
- Set up Django's cache framework using Redis
- Call
sentry_sdk.init() with:
integrations=[
DjangoIntegration(cache_spans=True),
...
]
- Cache an instance of
NDFrame (we're specifically creating a GeoDataFrame) using cache.set()
- Retrieve the instance using
cache.get()
Expected Result
No exception should be logged using Sentry's internal logger.
Actual Result
This check triggers NDFrame.__bool__(), which raises a ValueError, causing Sentry to log an internal exception.
Fix suggestion
It looks like the previously mentioned check is for whether there was a cache hit or not, and so I'm assuming this bug could be fixed by simply changing the check to if value is not None:, as None is the default value that will be returned by cache.get() on a cache miss.
How do you use Sentry?
Sentry Saas (sentry.io)
Version
2.42.0
Steps to Reproduce
sentry_sdk.init()with:NDFrame(we're specifically creating aGeoDataFrame) usingcache.set()cache.get()Expected Result
No exception should be logged using Sentry's internal logger.
Actual Result
This check triggers
NDFrame.__bool__(), which raises aValueError, causing Sentry to log an internal exception.Fix suggestion
It looks like the previously mentioned check is for whether there was a cache hit or not, and so I'm assuming this bug could be fixed by simply changing the check to
if value is not None:, asNoneis the default value that will be returned bycache.get()on a cache miss.