Title: Incorrect line number calculated in traceback · Issue #93662 · python/cpython · GitHub
Open Graph Title: Incorrect line number calculated in traceback · Issue #93662 · python/cpython
X Title: Incorrect line number calculated in traceback · Issue #93662 · python/cpython
Description: Consider the following code: def _run_with_file_output(): example_report_generation_message= ( """ """ ).strip() raise ValueError() _run_with_file_output() If you execute this with 3.11.0a7 you get (correct traceback): Traceback (most re...
Open Graph Description: Consider the following code: def _run_with_file_output(): example_report_generation_message= ( """ """ ).strip() raise ValueError() _run_with_file_output() If you execute this with 3.11.0a7 you get...
X Description: Consider the following code: def _run_with_file_output(): example_report_generation_message= ( """ """ ).strip() raise ValueError() _run_with_file_output() If you exec...
Opengraph URL: https://github.com/python/cpython/issues/93662
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incorrect line number calculated in traceback","articleBody":"Consider the following code:\r\n\r\n```\r\ndef _run_with_file_output():\r\n example_report_generation_message= (\r\n \"\"\"\r\n \"\"\"\r\n ).strip()\r\n raise ValueError()\r\n\r\n_run_with_file_output()\r\n```\r\n\r\nIf you execute this with 3.11.0a7 you get (correct traceback):\r\n\r\n```traceback\r\nTraceback (most recent call last):\r\n File \"/home/pablogsal/github/python/3.11/lel.py\", line 8, in \u003cmodule\u003e\r\n _run_with_file_output()\r\n ^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/pablogsal/github/python/3.11/lel.py\", line 6, in _run_with_file_output\r\n raise ValueError()\r\n ^^^^^^^^^^^^^^^^^^\r\nValueError\r\n```\r\n\r\nbut on 3.11.0b1 you get:\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/home/pablogsal/github/python/3.11/lel.py\", line 8, in \u003cmodule\u003e\r\n _run_with_file_output()\r\n ^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/pablogsal/github/python/3.11/lel.py\", line 255, in _run_with_file_output\r\nValueError\r\n```\r\n\r\nNotice that the last line number for `_run_with_file_output` is wrong (255 instead of 6).\r\n\r\nBisecting points at:\r\n\r\n```\r\n944fffee8916cb94321fa33cd3a43f4108717746 is the first bad commit\r\ncommit 944fffee8916cb94321fa33cd3a43f4108717746\r\nAuthor: Mark Shannon \u003cmark@hotpy.org\u003e\r\nDate: Thu Apr 21 16:10:37 2022 +0100\r\n\r\n GH-88116: Use a compact format to represent end line and column offsets. (GH-91666)\r\n\r\n * Stores all location info in linetable to conform to PEP 626.\r\n\r\n * Remove column table from code objects.\r\n\r\n * Remove end-line table from code objects.\r\n\r\n * Document new location table format\r\n ```","author":{"url":"https://github.com/pablogsal","@type":"Person","name":"pablogsal"},"datePublished":"2022-06-09T23:22:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/93662/cpython/issues/93662"}
| 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:170ddd80-6212-f90b-d2c1-19011a18ed2c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BDDC:23762:BFD2CE:FFC2C6:69699683 |
| html-safe-nonce | fe51b22284e793383dba4abcd548e67ca4c988ec72a2f9960086c8de6fe6af40 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRERDOjIzNzYyOkJGRDJDRTpGRkMyQzY6Njk2OTk2ODMiLCJ2aXNpdG9yX2lkIjoiMjUyMTg5NzI3Nzc2ODQzOTQyNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ef0bd6ae950b87094223d940cd4274c4c4fc89b378f33346cbf06d90aa29cf18 |
| hovercard-subject-tag | issue:1266762129 |
| 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/93662/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b7a1fc4ac767a341ce9ded12cb14402107c5473ac81e115361319a7a80d6e6f7/python/cpython/issues/93662 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b7a1fc4ac767a341ce9ded12cb14402107c5473ac81e115361319a7a80d6e6f7/python/cpython/issues/93662 |
| og:image:alt | Consider the following code: def _run_with_file_output(): example_report_generation_message= ( """ """ ).strip() raise ValueError() _run_with_file_output() If you execute this with 3.11.0a7 you get... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pablogsal |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3542e147982176a7ebaa23dfb559c8af16f721c03ec560c68c56b64a0f35e751 |
| 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 | af80af7cc9e3de9c336f18b208a600950a3c187c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width