Title: (🐞) Column marker in error message off when line contains non ASCII character · Issue #102310 · python/cpython · GitHub
Open Graph Title: (🐞) Column marker in error message off when line contains non ASCII character · Issue #102310 · python/cpython
X Title: (🐞) Column marker in error message off when line contains non ASCII character · Issue #102310 · python/cpython
Description: b"Ā" 👉 python test.py File "/test.py", line 1 b"Ā" ^ SyntaxError: bytes can only contain ASCII literal characters Here the caret is pointing to blackspace after the code So each non-ASCII character is adding more incorrect offset: 👉 $c:t...
Open Graph Description: b"Ā" 👉 python test.py File "/test.py", line 1 b"Ā" ^ SyntaxError: bytes can only contain ASCII literal characters Here the caret is pointing to blackspace after the code So each non-ASCII character...
X Description: b"Ā" 👉 python test.py File "/test.py", line 1 b"Ā" ^ SyntaxError: bytes can only contain ASCII literal characters Here the caret is pointing to blackspace after the co...
Opengraph URL: https://github.com/python/cpython/issues/102310
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"(🐞) Column marker in error message off when line contains non ASCII character","articleBody":"```py\r\nb\"Ā\"\r\n```\r\n```\r\n👉 python test.py\r\n File \"/test.py\", line 1\r\n b\"Ā\"\r\n ^\r\nSyntaxError: bytes can only contain ASCII literal characters\r\n```\r\nHere the caret is pointing to blackspace after the code\r\n\r\n\r\nSo each non-ASCII character is adding more incorrect offset:\r\n```\r\n👉 $c:temp = \"b'ĀĀĀĀĀĀĀĀ'\"\r\n👉 py temp\r\n File \"C:\\temp\", line 1\r\n b'ĀĀĀĀĀĀĀĀ'\r\n ^\r\n```\r\n\r\n## Expected\r\n```\r\n👉 python test.py\r\n File \"/test.py\", line 1\r\n b\"Ā\"\r\n ^\r\nSyntaxError: bytes can only contain ASCII literal characters\r\n```\r\n\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-103663\n* gh-103703\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/KotlinIsland","@type":"Person","name":"KotlinIsland"},"datePublished":"2023-02-28T00:55:40Z","url":"https://github.com/python/cpython/issues/102310"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:7ec192c8-8912-6fe3-625a-39ff76c51604 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D154:317608:3B49862:4B12EBE:6B01FAFB |
| html-safe-nonce | 1f3b50b41c1860a171c657d3465cd9d1b161a5a76badd17ec49ed46c4bf98a5f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTU0OjMxNzYwODozQjQ5ODYyOjRCMTJFQkU6NkIwMUZBRkIiLCJ2aXNpdG9yX2lkIjoiMzU3NDAzNTgxMTQzMzMxNTA2NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c7627f537ef1d40042bbbec5a78ac48b48d91d35fcfb3470fdc3befe6d90f05b |
| hovercard-subject-tag | issue:1602191549 |
| 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/102310/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f4ffc2f68e7a34a6619680c724805b78f6e22437140551121363253cca8ab3e0/python/cpython/issues/102310 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f4ffc2f68e7a34a6619680c724805b78f6e22437140551121363253cca8ab3e0/python/cpython/issues/102310 |
| og:image:alt | b"Ā" 👉 python test.py File "/test.py", line 1 b"Ā" ^ SyntaxError: bytes can only contain ASCII literal characters Here the caret is pointing to blackspace after the code So each non-ASCII character... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | KotlinIsland |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width