Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help() crashes when given name not found #105702

Closed
terryjreedy opened this issue Jun 12, 2023 · 2 comments
Closed

Help() crashes when given name not found #105702

terryjreedy opened this issue Jun 12, 2023 · 2 comments
Labels
3.11 only security fixes 3.12 bugs and security fixes 3.13 bugs and security fixes release-blocker type-bug An unexpected behavior, bug, or error

Comments

@terryjreedy
Copy link
Member

terryjreedy commented Jun 12, 2023

On Win 10 in 3.11.4, 3.12.0b1, and main compiled yesterday, there is a regression in that help() crashes.

help> xyz
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "F:\dev\3x\Lib\_sitebuiltins.py", line 103, in __call__
    return pydoc.help(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\dev\3x\Lib\pydoc.py", line 2009, in __call__
    self.interact()
  File "F:\dev\3x\Lib\pydoc.py", line 2036, in interact
    self.help(request)
  File "F:\dev\3x\Lib\pydoc.py", line 2062, in help
    elif request: doc(request, 'Help on %s:', output=self._output)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\dev\3x\Lib\pydoc.py", line 1786, in doc
    pager(render_doc(thing, title, forceload))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\dev\3x\Lib\pydoc.py", line 1760, in render_doc
    object, name = resolve(thing, forceload)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\dev\3x\Lib\pydoc.py", line 1746, in resolve
    raise ImportError('''\
ImportError: No Python documentation found for 'xyz'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.
>>>

In 3.10.11, 3.9.13, 3.8.10, there is no traceback. The exception is caught, the message printed, the short instructions printed, as above, and the help prompt given again.

help> xyz
No Python documentation found for 'xyz'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

help> 

This somehow messes up IDLE calltips, #105689, but I am treating that as a separate issue, though a diagnosis there as to whether the post-crash IDLE problem is in IDLE itself or somewhere else might give a hint here.

@Eclips4
Copy link
Member

Eclips4 commented Jun 12, 2023

Duplicate of #102541
We have a PR to solve this issue =)

@terryjreedy
Copy link
Member Author

Thanks, I should have checked, or remember commenting there.

@terryjreedy terryjreedy closed this as not planned Won't fix, can't repro, duplicate, stale Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes 3.12 bugs and security fixes 3.13 bugs and security fixes release-blocker type-bug An unexpected behavior, bug, or error
Projects
Development

No branches or pull requests

2 participants