New submission from Dev Player <devpla...@gmail.com>: 2010-10-10 python.exe crashes or hangs on help() modules when bad modules found
####################################################################### SUMMARY The python.exe command line interpreter crashes or hangs when typing first >>>help() then >modules and a corrupt module is found. Python 2.7 WinXP SP3 see version details in OUTPUT sections ####################################################################### EXPLANATION # ----------------------- I have a workaround as a user. However it appears to be a bug from previous Python versions, 2.5 and 2.6 from what I've seen through Google and other help() module tickets. The workaround is simply remove the corrupt package. # ----------------------- I've noticed when there is a corrupt package on my PC in the Q:\Python27\Lib\site-packages folder that seems to cause a problem when issuing >>>help() then >modules in Python. Python command line interperter doesn't gracefully exit the assertion, it crashes or hangs. When entering python.exe, idle.exe or pycrust.bat (runs pycrust.py), typing help(), then typing modules, the help routine runs most of the "search-for-packages" routine fine (see OUTPUT SECTION below) and seems to find all the installed modules but when it's finished it does the following: - python.exe either crashes, or puts up a help> prompt window and then drops to the DOS command prompt as seen below. MS window error: python.exe has encountered a problem and needs to clos. We are sorry for the inconvienience AppName: python.exe AppVer: 0.0.0.0 ModName: unknown ModVer: 0.0.0.0 Offset: 00a20fdf - IDLE.py doesn't crash but after the >>>help() >modules it shows the errors in .py files - PyCrust.py runs the >>>help() > modules it then shows errors in .py files, it then crashes In my case you will note the problem occurs on my install of the pythonwin package. On my system pythonwin will work until I exit. I installed a new version pythonwin just after installing Python 2.7. The pythonwin version always crashed on exit since it was installed. The old pythonwin was deinstalled before installation of the new. However, having a corrupt installed package shouldn't crash python. pythonwin version: pywin32 build214 # ----------------------- Something of note: All my development, including Python 2.7 installation and packages and projects are on my Q: drive, which is a mapped drive pointing to a sub-folder on a networked-shared folder in WinXP. Actual Folder: D:\SUBST_DRIVES\DRIVE_Q_DEVELOPMENT Net-shared Folder: \\Mycomp\D$\Subst_drives Mapped Folder: Q: = \\Mycomp\D$\Subst_drives\DRIVE_Q_DEVELOPMENT Although not directly used by the user (me) I also have subst'd drives attached to sub-folders of: D:\SUBST_DRIVES\DRIVE_Q_DEVELOPMENT such as: U: = D:\SUBST_DRIVES\DRIVE_Q_DEVELOPMENT\Projects\Python27\current I only mention this in case the >>>help() >modules routine, while seeking modules, can traverse folder structure attached to soft and hard link combos, symbolic links and junction points or whether they have an effect on traversing the folder structure while searching for packages. However, I went directly to the folder holding python.exe at D:\SUBST_DRIVES\DRIVE_Q_DEVELOPMENT\Python27\python.exe When doing help() modules .\python.exe crashed at the end of executing "modules" as well. # ----------------------- So far, I personally have not come across any other issues with my installation and python programs and demo code run with Python 2.7 except the previously noted exiting-of-pythonwin # ----------------------- Further details and output from running help() modules below for each of python.exe, pycrust and idle. ####################################################################### OUTPUT (3 Sections for 3 programs packaged with Python distribution) ####################################################################### ####################################################################### ####################################################################### SECTION 1 OF 3 python.exe #---------------------------------------------------------------------- Q:\Projects\Python27>python.exe Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> help() Welcome to Python 2.7! This is the online help utility. If this is your first time using Python, you should definitely check out the tutorial on the Internet at http://docs.python.org/tutorial/. Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To quit this help utility and return to the interpreter, just type "quit". To get a list of available modules, keywords, or topics, type "modules", "keywords", or "topics". Each module also comes with a one-line summary of what it does; to list the modules whose summaries contain a given word such as "spam", type "modules spam". help> modules Please wait a moment while I gather a list of all available modules... AutoComplete _threading_local itertools sspi AutoCompleteWindow _tkinter json sspicon AutoExpand _warnings keybindingDialog stat BaseHTTPServer _weakref keyword statvfs Bastion _weakrefset lib string Bindings _win32sysloader lib2to3 stringold CGIHTTPServer _winreg linecache stringprep CallTipWindow _winxptheme locale strop CallTips abc logging struct Canvas aboutDialog macosxSupport subprocess ClassBrowser adodbapi macpath sunau CodeContext afxres macurl2path sunaudio ColorDelegator aifc mailbox symbol ConfigParser antigravity mailcap symtable Cookie anydbm markupbase sys CreateBatchFiles app marshal sysconfig CreateMacScripts argparse math tabbedpages Debugger array md5 tabnanny Delegator ast media tarfile Dialog asynchat mhlib telnetlib DocXMLRPCServer asyncore mimetools tempfile EditorWindow atexit mimetypes test Enums audiodev mimify testcode FileDialog audioop mmap tests FileList base64 mmapfile text FixTk bdb mmsystem textView FormatParagraph binascii modulefinder textwrap GrepDialog binhex msilib this HTMLParser bisect msvcrt thread HyperParser bsddb multifile threading ID_NS bz2 multiprocessing time IOBinding cPickle mutex timeit IdleHistory cProfile netbios timer MOCK_WX cStringIO netrc tkColorChooser MimeWriter calendar new tkCommonDialog MultiCall cgi nntplib tkFileDialog MultiStatusBar cgitb nt tkFont ObjectBrowser chunk ntpath tkMessageBox ObjectListView clock ntsecuritycon tkSimpleDialog OutputWindow cmath nturl2path toaiff ParenMatch cmd numbers token PathBrowser code odbc tokenize Percolator codecs opcode trace PyParse codeop operator traceback PyShell collections optparse ttk PythonOgreConfig colorsys os tty Queue com os2emxpath turtle RemoteDebugger commands parser types RemoteObjectBrowser commctrl pdb unicodedata ReplaceDialog compileall perfmon unittest ReportVersion compiler pickle urllib RstripExtension configDialog pickletools urllib2 SampleFramework configHandler pipes urlparse ScriptBinding configHelpSourceEdit pkgutil user ScrolledList configSectionNameDialog platform utils ScrolledText contextlib plistlib uu SearchDialog convert_to_PANP popen2 uuid SearchDialogBase cookielib poplib warnings SearchEngine copy posixfile wave SimpleDialog copy_reg posixpath weakref SimpleHTTPServer core pprint webbrowser SimpleXMLRPCServer csv profile whichdb SocketServer ctypes pstats win2kras StackViewer curses pty win32api StringIO datetime pub win32clipboard Tix dbhash pubsub win32com Tkconstants dbi pubsub1 win32con Tkdnd dde pubsubconf win32console Tkinter decimal py_compile win32cred ToolTip difflib pyclbr win32crypt TreeWidget dircache pycrust_c win32cryptcon UndoDelegator dis pycrust_gdir win32event UserDict distutils pydoc win32evtlog UserList doctest pydoc_data win32evtlogutil UserString dprint pyexpat win32file WidgetRedirector dumbdbm pyglet win32gui WindowList dummy_thread pythoncom win32gui_struct ZoomHeight dummy_threading pythonstartup win32help _LWPCookieJar dynOptionMenuWidget pywin win32inet _MozillaCookieJar email pywin32_postinstall win32inetcon __builtin__ encodings pywin32_testutil win32job __future__ errno pywintypes win32lz _abcoll event quopri win32net _ast exceptions random win32netcon _autosetuppubsubv1 filecmp rasutil win32pdh _bisect fileinput re win32pdhquery _bsddb fnmatch regcheck win32pdhutil _codecs font regutil win32pipe _codecs_cn formatter repr win32print _codecs_hk fpformat resource win32process _codecs_iso2022 fractions rexec win32profile _codecs_jp ftplib rfc822 win32ras _codecs_kr functools rlcompleter win32rcparser _codecs_tw future_builtins robotparser win32security _collections gc rpc win32service _csv genericpath run win32serviceutil _ctypes getopt runpy win32timezone _ctypes_test getpass sched win32trace _elementtree gettext select win32traceutil _functools gl servicemanager win32transaction _hashlib glob sets win32ts _heapq graphics setup win32ui _hotshot gzip setuparg1 win32uiole _io hashlib setupkwargs win32verstamp _json heapq setupv1 win32wnet _locale hmac setupv2 window _lsprof hotshot sgmllib winerror _md5 htmlentitydefs sha winioctlcon _msi htmllib shelve winnt _multibytecodec httplib shlex winperf _multiprocessing idle shutil winsound _pyio idlelib signal winxpgui _random idlever singletonmixin winxptheme _sha ihooks site wsgiref _sha256 image smtpd wx _sha512 imageop smtplib wxPython _socket imaplib sndhdr wxversion _sqlite3 imghdr socket xdrlib _sre imp sprite xml _ssl importlib sqlite3 xmllib _strptime imputil sre xmlrpclib _struct info sre_compile xxsubtype _subprocess inspect sre_constants zipfile _symtable io sre_parse zipimport _testcapi isapi ssl zlib Enter any module name to get more help. Or, type "modules spam" to search for modules whose descriptions contain the word "spam". Q:\Projects\Python27> #---------------------------------------------------------------------- WHAT YOU SEE ABOVE a copy and past: python.exe either crashes, or puts up a help> prompt window and then drops to the DOS command prompt as seen above without indicating there was a corrupt package. ####################################################################### ####################################################################### ####################################################################### SECTION 2 OF 3 IDLE #---------------------------------------------------------------------- Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> help() Welcome to Python 2.7! This is the online help utility. If this is your first time using Python, you should definitely check out the tutorial on the Internet at http://docs.python.org/tutorial/. Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To quit this help utility and return to the interpreter, just type "quit". To get a list of available modules, keywords, or topics, type "modules", "keywords", or "topics". Each module also comes with a one-line summary of what it does; to list the modules whose summaries contain a given word such as "spam", type "modules spam". help> modules Please wait a moment while I gather a list of all available modules... AutoComplete _threading_local itertools sspi AutoCompleteWindow _tkinter json sspicon AutoExpand _warnings keybindingDialog stat BaseHTTPServer _weakref keyword statvfs Bastion _weakrefset lib string Bindings _win32sysloader lib2to3 stringold CGIHTTPServer _winreg linecache stringprep CallTipWindow _winxptheme locale strop CallTips abc logging struct Canvas aboutDialog macosxSupport subprocess ClassBrowser adodbapi macpath sunau CodeContext afxres macurl2path sunaudio ColorDelegator aifc mailbox symbol ConfigParser antigravity mailcap symtable Cookie anydbm markupbase sys CreateBatchFiles app marshal sysconfig CreateMacScripts argparse math tabbedpages Debugger array md5 tabnanny Delegator ast media tarfile Dialog asynchat mhlib telnetlib DocXMLRPCServer asyncore mimetools tempfile EditorWindow atexit mimetypes test Enums audiodev mimify testcode FileDialog audioop mmap tests FileList base64 mmapfile text FixTk bdb mmsystem textView FormatParagraph binascii modulefinder textwrap GrepDialog binhex msilib this HTMLParser bisect msvcrt thread HyperParser bsddb multifile threading ID_NS bz2 multiprocessing time IOBinding cPickle mutex timeit IdleHistory cProfile netbios timer MOCK_WX cStringIO netrc tkColorChooser MimeWriter calendar new tkCommonDialog MultiCall cgi nntplib tkFileDialog MultiStatusBar cgitb nt tkFont ObjectBrowser chunk ntpath tkMessageBox ObjectListView clock ntsecuritycon tkSimpleDialog OutputWindow cmath nturl2path toaiff ParenMatch cmd numbers token PathBrowser code odbc tokenize Percolator codecs opcode trace PyParse codeop operator traceback PyShell collections optparse ttk PythonOgreConfig colorsys os tty Queue com os2emxpath turtle RemoteDebugger commands parser types RemoteObjectBrowser commctrl pdb unicodedata ReplaceDialog compileall perfmon unittest ReportVersion compiler pickle urllib RstripExtension configDialog pickletools urllib2 SampleFramework configHandler pipes urlparse ScriptBinding configHelpSourceEdit pkgutil user ScrolledList configSectionNameDialog platform utils ScrolledText contextlib plistlib uu SearchDialog convert_to_PANP popen2 uuid SearchDialogBase cookielib poplib warnings SearchEngine copy posixfile wave SimpleDialog copy_reg posixpath weakref SimpleHTTPServer core pprint webbrowser SimpleXMLRPCServer csv profile whichdb SocketServer ctypes pstats win2kras StackViewer curses pty win32api StringIO datetime pub win32clipboard Tix dbhash pubsub win32com Tkconstants dbi pubsub1 win32con Tkdnd dde pubsubconf win32console Tkinter decimal py_compile win32cred ToolTip difflib pyclbr win32crypt TreeWidget dircache pycrust_c win32cryptcon UndoDelegator dis pycrust_gdir win32event UserDict distutils pydoc win32evtlog UserList doctest pydoc_data win32evtlogutil UserString dprint pyexpat win32file WidgetRedirector dumbdbm pyglet win32gui WindowList dummy_thread pythoncom win32gui_struct ZoomHeight dummy_threading pythonstartup win32help _LWPCookieJar dynOptionMenuWidget pywin win32inet _MozillaCookieJar email pywin32_postinstall win32inetcon __builtin__ encodings pywin32_testutil win32job __future__ errno pywintypes win32lz _abcoll event quopri win32net _ast exceptions random win32netcon _autosetuppubsubv1 filecmp rasutil win32pdh _bisect fileinput re win32pdhquery _bsddb fnmatch regcheck win32pdhutil _codecs font regutil win32pipe _codecs_cn formatter repr win32print _codecs_hk fpformat resource win32process _codecs_iso2022 fractions rexec win32profile _codecs_jp ftplib rfc822 win32ras _codecs_kr functools rlcompleter win32rcparser _codecs_tw future_builtins robotparser win32security _collections gc rpc win32service _csv genericpath run win32serviceutil _ctypes getopt runpy win32timezone _ctypes_test getpass sched win32trace _elementtree gettext select win32traceutil _functools gl servicemanager win32transaction _hashlib glob sets win32ts _heapq graphics setup win32ui _hotshot gzip setuparg1 win32uiole _io hashlib setupkwargs win32verstamp _json heapq setupv1 win32wnet _locale hmac setupv2 window _lsprof hotshot sgmllib winerror _md5 htmlentitydefs sha winioctlcon _msi htmllib shelve winnt _multibytecodec httplib shlex winperf _multiprocessing idle shutil winsound _pyio idlelib signal winxpgui _random idlever singletonmixin winxptheme _sha ihooks site wsgiref _sha256 image smtpd wx _sha512 imageop smtplib wxPython _socket imaplib sndhdr wxversion _sqlite3 imghdr socket xdrlib _sre imp sprite xml _ssl importlib sqlite3 xmllib _strptime imputil sre xmlrpclib _struct info sre_compile xxsubtype _subprocess inspect sre_constants zipfile _symtable io sre_parse zipimport _testcapi isapi ssl zlib Enter any module name to get more help. Or, type "modules spam" to search for modules whose descriptions contain the word "spam". Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> help() File "Q:\Python27\lib\site.py", line 453, in __call__ return pydoc.help(*args, **kwds) File "Q:\Python27\lib\pydoc.py", line 1723, in __call__ self.interact() File "Q:\Python27\lib\pydoc.py", line 1735, in interact request = self.getline('help> ') File "Q:\Python27\lib\pydoc.py", line 1746, in getline return raw_input(prompt) File "Q:\Python27\Lib\site-packages\pythonwin\pywin\framework\app.py", line 367, in Win32RawInput ret=dialog.GetSimpleInput(prompt) File "Q:\Python27\Lib\site-packages\pythonwin\pywin\mfc\dialog.py", line 223, in GetSimpleInput if title is None: title=win32ui.GetMainFrame().GetWindowText() error: The frame does not exist >>> #---------------------------------------------------------------------- IDLE doesn't crash ####################################################################### ####################################################################### ####################################################################### SECTION 3 OF 3 PyCrust #---------------------------------------------------------------------- PyCrust 0.9.8 - The Flakiest Python Shell Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. Startup script executed: C:\Documents and Settings\User\Application Data\pycrust\startup help() Welcome to Python 2.7! This is the online help utility. If this is your first time using Python, you should definitely check out the tutorial on the Internet at http://docs.python.org/tutorial/. Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To quit this help utility and return to the interpreter, just type "quit". To get a list of available modules, keywords, or topics, type "modules", "keywords", or "topics". Each module also comes with a one-line summary of what it does; to list the modules whose summaries contain a given word such as "spam", type "modules spam". help> modules Please wait a moment while I gather a list of all available modules... AutoComplete _threading_local itertools sspi AutoCompleteWindow _tkinter json sspicon AutoExpand _warnings keybindingDialog stat BaseHTTPServer _weakref keyword statvfs Bastion _weakrefset lib string Bindings _win32sysloader lib2to3 stringold CGIHTTPServer _winreg linecache stringprep CallTipWindow _winxptheme locale strop CallTips abc logging struct Canvas aboutDialog macosxSupport subprocess ClassBrowser adodbapi macpath sunau CodeContext afxres macurl2path sunaudio ColorDelegator aifc mailbox symbol ConfigParser antigravity mailcap symtable Cookie anydbm markupbase sys CreateBatchFiles app marshal sysconfig CreateMacScripts argparse math tabbedpages Debugger array md5 tabnanny Delegator ast media tarfile Dialog asynchat mhlib telnetlib DocXMLRPCServer asyncore mimetools tempfile EditorWindow atexit mimetypes test Enums audiodev mimify testcode FileDialog audioop mmap tests FileList base64 mmapfile text FixTk bdb mmsystem textView FormatParagraph binascii modulefinder textwrap GrepDialog binhex msilib this HTMLParser bisect msvcrt thread HyperParser bsddb multifile threading ID_NS bz2 multiprocessing time IOBinding cPickle mutex timeit IdleHistory cProfile netbios timer MOCK_WX cStringIO netrc tkColorChooser MimeWriter calendar new tkCommonDialog MultiCall cgi nntplib tkFileDialog MultiStatusBar cgitb nt tkFont ObjectBrowser chunk ntpath tkMessageBox ObjectListView clock ntsecuritycon tkSimpleDialog OutputWindow cmath nturl2path toaiff ParenMatch cmd numbers token PathBrowser code odbc tokenize Percolator codecs opcode trace PyParse codeop operator traceback PyShell collections optparse ttk PythonOgreConfig colorsys os tty Queue com os2emxpath turtle RemoteDebugger commands parser types RemoteObjectBrowser commctrl pdb unicodedata ReplaceDialog compileall perfmon unittest ReportVersion compiler pickle urllib RstripExtension configDialog pickletools urllib2 SampleFramework configHandler pipes urlparse ScriptBinding configHelpSourceEdit pkgutil user ScrolledList configSectionNameDialog platform utils ScrolledText contextlib plistlib uu SearchDialog convert_to_PANP popen2 uuid SearchDialogBase cookielib poplib warnings SearchEngine copy posixfile wave SimpleDialog copy_reg posixpath weakref SimpleHTTPServer core pprint webbrowser SimpleXMLRPCServer csv profile whichdb SocketServer ctypes pstats win2kras StackViewer curses pty win32api StringIO datetime pub win32clipboard Tix dbhash pubsub win32com Tkconstants dbi pubsub1 win32con Tkdnd dde pubsubconf win32console Tkinter decimal py_compile win32cred ToolTip difflib pyclbr win32crypt TreeWidget dircache pycrust_c win32cryptcon UndoDelegator dis pycrust_gdir win32event UserDict distutils pydoc win32evtlog UserList doctest pydoc_data win32evtlogutil UserString dprint pyexpat win32file WidgetRedirector dumbdbm pyglet win32gui WindowList dummy_thread pythoncom win32gui_struct ZoomHeight dummy_threading pythonstartup win32help _LWPCookieJar dynOptionMenuWidget pywin win32inet _MozillaCookieJar email pywin32_postinstall win32inetcon __builtin__ encodings pywin32_testutil win32job __future__ errno pywintypes win32lz _abcoll event quopri win32net _ast exceptions random win32netcon _autosetuppubsubv1 filecmp rasutil win32pdh _bisect fileinput re win32pdhquery _bsddb fnmatch regcheck win32pdhutil _codecs font regutil win32pipe _codecs_cn formatter repr win32print _codecs_hk fpformat resource win32process _codecs_iso2022 fractions rexec win32profile _codecs_jp ftplib rfc822 win32ras _codecs_kr functools rlcompleter win32rcparser _codecs_tw future_builtins robotparser win32security _collections gc rpc win32service _csv genericpath run win32serviceutil _ctypes getopt runpy win32timezone _ctypes_test getpass sched win32trace _elementtree gettext select win32traceutil _functools gl servicemanager win32transaction _hashlib glob sets win32ts _heapq graphics setup win32ui _hotshot gzip setuparg1 win32uiole _io hashlib setupkwargs win32verstamp _json heapq setupv1 win32wnet _locale hmac setupv2 window _lsprof hotshot sgmllib winerror _md5 htmlentitydefs sha winioctlcon _msi htmllib shelve winnt _multibytecodec httplib shlex winperf _multiprocessing idle shutil winsound _pyio idlelib signal winxpgui _random idlever singletonmixin winxptheme _sha ihooks site wsgiref _sha256 image smtpd wx _sha512 imageop smtplib wxPython _socket imaplib sndhdr wxversion _sqlite3 imghdr socket xdrlib _sre imp sprite xml _ssl importlib sqlite3 xmllib _strptime imputil sre xmlrpclib _struct info sre_compile xxsubtype _subprocess inspect sre_constants zipfile _symtable io sre_parse zipimport _testcapi isapi ssl zlib Enter any module name to get more help. Or, type "modules spam" to search for modules whose descriptions contain the word "spam". Traceback (most recent call last): File "<input>", line 1, in <module> File "Q:\Python27\lib\site.py", line 453, in __call__ return pydoc.help(*args, **kwds) File "Q:\Python27\lib\pydoc.py", line 1723, in __call__ self.interact() File "Q:\Python27\lib\pydoc.py", line 1735, in interact request = self.getline('help> ') File "Q:\Python27\lib\pydoc.py", line 1746, in getline return raw_input(prompt) File "Q:\Python27\Lib\site-packages\pythonwin\pywin\framework\app.py", line 367, in Win32RawInput ret=dialog.GetSimpleInput(prompt) File "Q:\Python27\Lib\site-packages\pythonwin\pywin\mfc\dialog.py", line 223, in GetSimpleInput if title is None: title=win32ui.GetMainFrame().GetWindowText() error: The frame does not exist #---------------------------------------------------------------------- Then after doing anything in PyCrust it crashes ####################################################################### ####################################################################### ####################################################################### ---------- components: IDLE messages: 118298 nosy: devplayer priority: normal severity: normal status: open title: python.exe crashes or hangs on help() modules when bad modules found type: crash versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10060> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com