This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fatal error using pydoc
Type: crash Stage: resolved
Components: Demos and Tools, macOS Versions: Python 3.6
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: ned.deily, opstad, ronaldoussoren
Priority: normal Keywords:

Created on 2018-01-03 17:49 by opstad, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg309422 - (view) Author: Dave Opstad (opstad) Date: 2018-01-03 17:49
I'm running 3.6.4 on Mac OS X 10.13.2, bash shell. Doing:

$ pydoc modules

causes:

Please wait a moment while I gather a list of all available modules...

Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6

Reproduced this several times with the same result.
msg309426 - (view) Author: Dave Opstad (opstad) Date: 2018-01-03 18:11
I think this was my mistake; when I used pydoc3 instead of pydoc it ran to completion. Please feel free to close this; sorry for the noise.
msg309429 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-01-03 19:17
Glad you solved the immediate problem.  Under the covers, pydoc (either pydoc2 or pydoc3) tries to import all the modules associated with the interpreter instance it's running under - from the Python standard library plus any additional vendor-supplied modules and and any you install (with pip et al).  It seems likely that the Python 2 instance associated with the "pydoc" on your shell path (not "pydoc3" and Python 3) has at least one broken module installed.  It may be a case of a third-party module being compiled against one version of Python 2.7 (say, a Homebrew version) and being executed with another (say the Apple-supplied system Python 2.7).  See, for example, https://stackoverflow.com/questions/35640529/what-does-fatal-python-error-pythreadstate-get-no-current-thread-mean
History
Date User Action Args
2022-04-11 14:58:56adminsetgithub: 76669
2018-01-03 19:17:47ned.deilysetstatus: open -> closed
resolution: works for me
messages: + msg309429

stage: resolved
2018-01-03 18:11:55opstadsetmessages: + msg309426
2018-01-03 18:09:26r.david.murraysetnosy: + ronaldoussoren, ned.deily
components: + macOS
2018-01-03 17:49:03opstadcreate