Skip to content

AttributeError: 'function' object has no attribute 'co_filename' #2022

@amureki

Description

@amureki

How do you use Sentry?

Sentry Saas (sentry.io)

Version

1.20.0

Steps to Reproduce

  • Run sentry SDK with profiling on
  • Python 3.11.3
  • Django 4.1
sentry_sdk.init(
    dsn=SENTRY_DSN,
    release=os.getenv("HEROKU_RELEASE_VERSION"),
    server_name=os.getenv("HEROKU_DYNO_ID"),
    integrations=[DjangoIntegration(), sentry_logging, RedisIntegration()],
    send_default_pii=True,
    debug=os.getenv("SENTRY_DEBUG") in TRUE_VALUES,
    traces_sample_rate=SENTRY_TRACES_SAMPLE_RATE,
    _experiments={
        "profiles_sample_rate": 1.0,
    },
)

Expected Result

No errors here

Actual Result

AttributeError: 'function' object has no attribute 'co_filename'
  File "threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions