Skip to content

sentry-sdk crashes on Python 3.13 and hides the real error (cannot pickle 'FrameLocalsProxy') #642

Closed

Description

@lgelauff

On Python 3.13, sentry-sdk 2.8.0 crashes while it captures an exception, so the API returns TypeError: cannot pickle 'FrameLocalsProxy' object instead of the real error, and coordinators see that text.

Reproduce (montage-dev, 2026-10-03)

Any request that raises: for example the category import in the 4-byte-names issue. The UI showed "Internal server error: <ExceptionInfo [TypeError: cannot pickle 'FrameLocalsProxy' object] ...". The real error (a MariaDB collation error) was only visible in montage_api.exc.log.

Cause

A known incompatibility of older sentry-sdk versions with Python 3.13's frame-locals proxy (PEP 667). Already mentioned under "Not in this PR" in #623.

Possible fix

Upgrade sentry-sdk to a version that supports Python 3.13.

Written with Claude (Claude Code) on behalf of @lgelauff.

Activity

  1. mahmoud commented on Oct 10, 2026

    @mahmoud
    Member

    Fixed in #659 (merged as 8ac4cfd): sentry-sdk 2.71.0 and clastic_sentry on the 2.x scope API. Confirm on montage-beta with GET /v1/raise reaching Sentry as RuntimeError: testing.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions