Title: Assertion failure in Modules/_io/textio.c `_io_TextIOWrapper_tell_impl: Assertion 'skip_back <= PyBytes_GET_SIZE(next_input)' failed` · Issue #141314 · python/cpython · GitHub
Open Graph Title: Assertion failure in Modules/_io/textio.c `_io_TextIOWrapper_tell_impl: Assertion 'skip_back <= PyBytes_GET_SIZE(next_input)' failed` · Issue #141314 · python/cpython
X Title: Assertion failure in Modules/_io/textio.c `_io_TextIOWrapper_tell_impl: Assertion 'skip_back <= PyBytes_GET_SIZE(next_input)' failed` · Issue #141314 · python/cpython
Description: Bug report Bug description: import io import os from test.support import os_helper DATA_TEMPLATE = ['line1=1'] DATA_CR = r'\n\r\t'.join(DATA_TEMPLATE) + '\r' open_func = io.open READMODE = 'r' WRITEMODE = 'wb' data = DATA_CR if 'b' in WR...
Open Graph Description: Bug report Bug description: import io import os from test.support import os_helper DATA_TEMPLATE = ['line1=1'] DATA_CR = r'\n\r\t'.join(DATA_TEMPLATE) + '\r' open_func = io.open READMODE = 'r' WRIT...
X Description: Bug report Bug description: import io import os from test.support import os_helper DATA_TEMPLATE = ['line1=1'] DATA_CR = r'\n\r\t'.join(DATA_TEMPLATE) + '\r' open_func = io....
Opengraph URL: https://github.com/python/cpython/issues/141314
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Assertion failure in Modules/_io/textio.c `_io_TextIOWrapper_tell_impl: Assertion 'skip_back \u003c= PyBytes_GET_SIZE(next_input)' failed`","articleBody":"# Bug report\n\n### Bug description:\n\n```python\nimport io\nimport os\nfrom test.support import os_helper\n\nDATA_TEMPLATE = ['line1=1']\nDATA_CR = r'\\n\\r\\t'.join(DATA_TEMPLATE) + '\\r'\n\nopen_func = io.open\n\nREADMODE = 'r'\nWRITEMODE = 'wb'\n\ndata = DATA_CR\nif 'b' in WRITEMODE:\n data = data.encode('ascii')\n\nwith open_func(os_helper.TESTFN, WRITEMODE) as fp:\n fp.write(data)\n\nwith open_func(os_helper.TESTFN, READMODE) as fp:\n _ = fp.readline()\n pos = fp.tell()\n```\n\n```\npython: ../Modules/_io/textio.c:2848: _io_TextIOWrapper_tell_impl: Assertion `skip_back \u003c= PyBytes_GET_SIZE(next_input)' failed.\nAborted (core dumped)\n```\n\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-141331\n* gh-141452\n* gh-141453\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/YuanchengJiang","@type":"Person","name":"YuanchengJiang"},"datePublished":"2025-11-09T18:34:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/141314/cpython/issues/141314"}
| 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:98f8a2c1-5fb7-ac89-c528-facf412caa0b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D1D6:1F29:2A843DC:39E5F2E:6A507C5D |
| html-safe-nonce | ccd0860a5325fe04c84a7645d0c79c619d96090ad04f4bd6725c51ed43004279 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUQ2OjFGMjk6MkE4NDNEQzozOUU1RjJFOjZBNTA3QzVEIiwidmlzaXRvcl9pZCI6IjgzMjEzMjAzOTcyOTc3MzY2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 151c8b215cd4d652d6627d310241fadf44c6e3a61ca13b6148ac25ff958da5e2 |
| hovercard-subject-tag | issue:3605321284 |
| 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/141314/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3c498b509cc597e7f95283e2ebe2b152942cc8e9bc30d0699d792f5b3342f067/python/cpython/issues/141314 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3c498b509cc597e7f95283e2ebe2b152942cc8e9bc30d0699d792f5b3342f067/python/cpython/issues/141314 |
| og:image:alt | Bug report Bug description: import io import os from test.support import os_helper DATA_TEMPLATE = ['line1=1'] DATA_CR = r'\n\r\t'.join(DATA_TEMPLATE) + '\r' open_func = io.open READMODE = 'r' WRIT... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | YuanchengJiang |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| 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 | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width