Title: `help` CLI shows a traceback when import failed · Issue #102541 · python/cpython · GitHub
Open Graph Title: `help` CLI shows a traceback when import failed · Issue #102541 · python/cpython
X Title: `help` CLI shows a traceback when import failed · Issue #102541 · python/cpython
Description: Currently, help will show a traceback when we type name of something which doesn't exist: help> 123 Traceback (most recent call last): File "
Open Graph Description: Currently, help will show a traceback when we type name of something which doesn't exist: help> 123 Traceback (most recent call last): File " X Description: Currently, help will show a traceback when we type name of something which doesn't exist: help> 123 Traceback (most recent call last): File "<stdin>", line 1, in <module&g...
Opengraph URL: https://github.com/python/cpython/issues/102541
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`help` CLI shows a traceback when import failed","articleBody":"Currently, `help` will show a traceback when we type name of something which doesn't exist:\r\n\r\n```python\r\nhelp\u003e 123\r\nTraceback (most recent call last):\r\n File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\r\n File \"\u003cfrozen _sitebuiltins\u003e\", line 103, in __call__\r\n File \"C:\\Users\\KIRILL-1\\CLionProjects\\cpython\\Lib\\pydoc.py\", line 2004, in __call__\r\n self.interact()\r\n File \"C:\\Users\\KIRILL-1\\CLionProjects\\cpython\\Lib\\pydoc.py\", line 2031, in interact\r\n self.help(request)\r\n File \"C:\\Users\\KIRILL-1\\CLionProjects\\cpython\\Lib\\pydoc.py\", line 2057, in help\r\n elif request: doc(request, 'Help on %s:', output=self._output)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"C:\\Users\\KIRILL-1\\CLionProjects\\cpython\\Lib\\pydoc.py\", line 1781, in doc\r\n pager(render_doc(thing, title, forceload))\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"C:\\Users\\KIRILL-1\\CLionProjects\\cpython\\Lib\\pydoc.py\", line 1755, in render_doc\r\n object, name = resolve(thing, forceload)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"C:\\Users\\KIRILL-1\\CLionProjects\\cpython\\Lib\\pydoc.py\", line 1741, in resolve\r\n raise ImportError('''\\\r\nImportError: No Python documentation found for '123'.\r\nUse help() to get the interactive help utility.\r\nUse help(str) for help on the str class.\r\n\u003e\u003e\u003e\r\n```\r\nI think, this shouldn't be shown.\r\nIs there any reason for this?\r\nCan we show something like\r\n`No python documentation found for '123'.`?\r\n\r\nReproducible on current main.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-102614\n* gh-105778\n* gh-105830\n* gh-105934\n* gh-106322\n* gh-106323\n* gh-106340\n* gh-106639\n* gh-106640\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/Eclips4","@type":"Person","name":"Eclips4"},"datePublished":"2023-03-08T21:16:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":16},"url":"https://github.com/102541/cpython/issues/102541"}
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:cc832132-2c82-b8b9-79a7-16f50356d2c5 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id 940E:37464F:40DE2F:5BCACA:696A0AEF html-safe-nonce 74dcde97b8d6550c9ae0c7db7cff47bdb3ecb8682e3494c6bf70464885089993 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDBFOjM3NDY0Rjo0MERFMkY6NUJDQUNBOjY5NkEwQUVGIiwidmlzaXRvcl9pZCI6IjI1NzYxMTgyNTQ4NzgxOTg1MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== visitor-hmac 84e43d8137ff8b427aed425b17fc74fb3dad6eb98661647ad4cb44b1644194c7 hovercard-subject-tag issue:1615953009 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/102541/issue_layout twitter:image https://opengraph.githubassets.com/ed10f41fb9a56fa82b6c5375da6153ed568d563cabd4eff004d265fdfd62a49b/python/cpython/issues/102541 twitter:card summary_large_image og:image https://opengraph.githubassets.com/ed10f41fb9a56fa82b6c5375da6153ed568d563cabd4eff004d265fdfd62a49b/python/cpython/issues/102541 og:image:alt Currently, help will show a traceback when we type name of something which doesn't exist: help> 123 Traceback (most recent call last): File " og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username Eclips4 hostname github.com expected-hostname github.com None 699227a00bbb7fe1eec276d2ae1c3a93068bc5ba483bd9dc4b2a27a8f4f2f595 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 7266b2d935baa1c6474b16dd9feaa5ca30607261 ui-target full theme-color #1e2327 color-scheme light dark
URLs of crawlers that visited me.