Title: Python 3.11.0b4 - py launcher fails when running a script with a shebang line · Issue #94772 · python/cpython · GitHub
Open Graph Title: Python 3.11.0b4 - py launcher fails when running a script with a shebang line · Issue #94772 · python/cpython
X Title: Python 3.11.0b4 - py launcher fails when running a script with a shebang line · Issue #94772 · python/cpython
Description: Bug report When running a script with a "shebang" line, the py.exe launcher in Python 3.11.0b4 fails with an error: To reproduce, create the following script as x.py: #!/usr/bin/env python import sys print(sys.version) print(sys.executab...
Open Graph Description: Bug report When running a script with a "shebang" line, the py.exe launcher in Python 3.11.0b4 fails with an error: To reproduce, create the following script as x.py: #!/usr/bin/env python import s...
X Description: Bug report When running a script with a "shebang" line, the py.exe launcher in Python 3.11.0b4 fails with an error: To reproduce, create the following script as x.py: #!/usr/bin/env pytho...
Opengraph URL: https://github.com/python/cpython/issues/94772
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Python 3.11.0b4 - py launcher fails when running a script with a shebang line","articleBody":"**Bug report**\r\n\r\nWhen running a script with a \"shebang\" line, the `py.exe` launcher in Python 3.11.0b4 fails with an error:\r\n\r\nTo reproduce, create the following script as `x.py`:\r\n\r\n```python\r\n#!/usr/bin/env python\r\nimport sys\r\nprint(sys.version)\r\nprint(sys.executable)\r\n```\r\n\r\nRun the script using `py.exe` built from a 3.11.0b4 checkout using `build.bat`:\r\n\r\n```\r\n❯ .\\amd64\\py.exe .\\x.py\r\n .\\x.py': The system cannot find the file specified.ata\\Local\\Programs\\Python\\Python310\\python.exe\r\n```\r\n\r\nNote the truncated python executable name. This appears to be related to the use of CRLF line endings in the file - if I switch to LF line endings, I get\r\n\r\n```\r\n❯ .\\amd64\\py.exe .\\x.py\r\nUnable to create process using 'C:\\Users\\Gustav\\AppData\\Local\\Programs\\Python\\Python310\\python.exe\r\n .\\x.py': The system cannot find the file specified.\r\n```\r\n\r\n**Your environment**\r\n\r\n- Launcher from 3.11.0b4, but the active Python version is 3.10.3.\r\n- Operating system and architecture: Windows 11, 64-bit.\r\n\r\n","author":{"url":"https://github.com/pfmoore","@type":"Person","name":"pfmoore"},"datePublished":"2022-07-12T10:00:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/94772/cpython/issues/94772"}
| 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:a5257e7f-f958-ccf9-48e1-f77810a8c4c3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 96FA:15EB16:3E18E3:547C5F:6A52496C |
| html-safe-nonce | e8f9d4e2cc4c5ec45ac0ba5ac5f5d9f8c85edb0ae270c19bf0562f847784e74b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NkZBOjE1RUIxNjozRTE4RTM6NTQ3QzVGOjZBNTI0OTZDIiwidmlzaXRvcl9pZCI6IjM4MDc3NzM5MTg4NTQ1MzE0MzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 50f12a8a1e53938ba5510f11b9ff8aaec12959c808372635170818d76972a3eb |
| hovercard-subject-tag | issue:1301829749 |
| 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/94772/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e8bdc0e1556b48c42d650239e4cc4527d641dadb5096deab7be9527e1fc8716f/python/cpython/issues/94772 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e8bdc0e1556b48c42d650239e4cc4527d641dadb5096deab7be9527e1fc8716f/python/cpython/issues/94772 |
| og:image:alt | Bug report When running a script with a "shebang" line, the py.exe launcher in Python 3.11.0b4 fails with an error: To reproduce, create the following script as x.py: #!/usr/bin/env python import s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pfmoore |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width