Skip to content

debugpy crashing when breakpoints are set on Python 3.13 #2577

@will-s-hart

Description

@will-s-hart

When trying to debug code in VS Code using cartopy (v0.25.0) with Python 3.13 (on Apple silicon), I'm getting the following exception on importing cartopy when breakpoints are set:

Exception has occurred: AssertionError
<code object _call_with_frames_removed at 0x104ea0570, file "<frozen importlib._bootstrap>", line 480> != <code object PyInit_trace at 0x1199aedb0, file "lib/cartopy/trace.pyx", line 1>
KeyError: (1, 'xx/envs/default/lib/python3.13/site-packages/lib/cartopy/trace.pyx', <code object PyInit_trace at 0x1199aedb0, file "lib/cartopy/trace.pyx", line 1>)

During handling of the above exception, another exception occurred:

  File "xx.py", line 1, in <module>
    import cartopy
AssertionError: <code object _call_with_frames_removed at 0x104ea0570, file "<frozen importlib._bootstrap>", line 480> != <code object PyInit_trace at 0x1199aedb0, file "lib/cartopy/trace.pyx", line 1>

Looking around, seems related to issues that have been reported in other packages using Cython:
#aio-libs/frozenlist#658
#CoolProp/CoolProp#2612

Not sure if this is something that can be fixed in cartopy? Thanks!

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