Title: Duplicate frame in traceback of exception raised inside trace function · Issue #102818 · python/cpython · GitHub
Open Graph Title: Duplicate frame in traceback of exception raised inside trace function · Issue #102818 · python/cpython
X Title: Duplicate frame in traceback of exception raised inside trace function · Issue #102818 · python/cpython
Description: First appeared in e028ae9. Reproducer: import sys def f(): pass def trace(frame, event, arg): raise ValueError() sys.settrace(trace) f() Before 'bad' commit (3e43fac): Traceback (most recent call last): File "/home/.../trace_tb_bug.py", ...
Open Graph Description: First appeared in e028ae9. Reproducer: import sys def f(): pass def trace(frame, event, arg): raise ValueError() sys.settrace(trace) f() Before 'bad' commit (3e43fac): Traceback (most recent call l...
X Description: First appeared in e028ae9. Reproducer: import sys def f(): pass def trace(frame, event, arg): raise ValueError() sys.settrace(trace) f() Before 'bad' commit (3e43fac): Traceback (most recen...
Opengraph URL: https://github.com/python/cpython/issues/102818
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Duplicate frame in traceback of exception raised inside trace function","articleBody":"First appeared in e028ae99ecee671c0e8a3eabb829b5b2acfc4441.\r\nReproducer:\r\n```python\r\nimport sys\r\n\r\ndef f():\r\n pass\r\n\r\ndef trace(frame, event, arg):\r\n raise ValueError()\r\n\r\nsys.settrace(trace)\r\nf()\r\n```\r\n\r\nBefore 'bad' commit (3e43fac2503afe219336742b150b3ef6e470686f):\r\n```\r\nTraceback (most recent call last):\r\n File \"/home/.../trace_tb_bug.py\", line 10, in \u003cmodule\u003e\r\n f()\r\n ^^^\r\n File \"/home/.../trace_tb_bug.py\", line 3, in f\r\n def f():\r\n File \"/home/.../trace_tb_bug.py\", line 7, in trace\r\n raise ValueError()\r\n ^^^^^^^^^^^^^^^^^^\r\nValueError\r\n```\r\n\r\nAfter 'bad' commit (e028ae99ecee671c0e8a3eabb829b5b2acfc4441):\r\n```\r\nTraceback (most recent call last):\r\n File \"/home/.../trace_tb_bug.py\", line 10, in \u003cmodule\u003e\r\n f()\r\n ^^^\r\n File \"/home/.../trace_tb_bug.py\", line 3, in f\r\n def f():\r\n \r\n File \"/home/.../trace_tb_bug.py\", line 3, in f\r\n def f():\r\n \r\n File \"/home/.../trace_tb_bug.py\", line 7, in trace\r\n raise ValueError()\r\n ^^^^^^^^^^^^^^^^^^\r\nValueError\r\n```\r\n\r\n3.11.0 release and main (039714d00f) also lack pointers to error locations, but this probably needs a different issue:\r\n```\r\nTraceback (most recent call last):\r\n File \"/home/.../trace_tb_bug.py\", line 10, in \u003cmodule\u003e\r\n f()\r\n File \"/home/.../trace_tb_bug.py\", line 3, in f\r\n def f():\r\n \r\n File \"/home/.../trace_tb_bug.py\", line 3, in f\r\n def f():\r\n \r\n File \"/home/.../trace_tb_bug.py\", line 7, in trace\r\n raise ValueError()\r\nValueError\r\n```\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-104579\n* gh-104650\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/chgnrdv","@type":"Person","name":"chgnrdv"},"datePublished":"2023-03-18T18:28:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/102818/cpython/issues/102818"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3421e20e-b0b0-eaf4-d7b0-16ba56777db6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E94E:31EA40:4BDF9A:663923:6969DA18 |
| html-safe-nonce | 239cd184fc6318fd9581cf01d87a797effbe187ac61400639fb5d6877adc9dc6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTRFOjMxRUE0MDo0QkRGOUE6NjYzOTIzOjY5NjlEQTE4IiwidmlzaXRvcl9pZCI6IjQ2MzQ1MzAwNjIxODUxMjY0MjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 81830fb149eb5c13e8624f303276d35022abbb0c705f516b3bb702194c18a0ba |
| hovercard-subject-tag | issue:1630497040 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/102818/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b3514d7b2a0d3094aad491201e5cf354f5333abba3c12b8b842afe0e956bfb23/python/cpython/issues/102818 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b3514d7b2a0d3094aad491201e5cf354f5333abba3c12b8b842afe0e956bfb23/python/cpython/issues/102818 |
| og:image:alt | First appeared in e028ae9. Reproducer: import sys def f(): pass def trace(frame, event, arg): raise ValueError() sys.settrace(trace) f() Before 'bad' commit (3e43fac): Traceback (most recent call l... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | chgnrdv |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width