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

IDLE will not load #49957

Closed
epitome83 mannequin opened this issue Apr 6, 2009 · 9 comments
Closed

IDLE will not load #49957

epitome83 mannequin opened this issue Apr 6, 2009 · 9 comments
Assignees
Labels
topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@epitome83
Copy link
Mannequin

epitome83 mannequin commented Apr 6, 2009

BPO 5707
Nosy @terryjreedy, @kbkaiser, @amauryfa, @serwy, @asvetlov
Files
  • idle_bindings.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/kbkaiser'
    closed_at = <Date 2012-03-25.21:09:29.987>
    created_at = <Date 2009-04-06.07:40:19.232>
    labels = ['expert-IDLE', 'type-bug']
    title = 'IDLE will not load'
    updated_at = <Date 2012-03-25.21:09:29.985>
    user = 'https://bugs.python.org/epitome83'

    bugs.python.org fields:

    activity = <Date 2012-03-25.21:09:29.985>
    actor = 'asvetlov'
    assignee = 'kbk'
    closed = True
    closed_date = <Date 2012-03-25.21:09:29.987>
    closer = 'asvetlov'
    components = ['IDLE']
    creation = <Date 2009-04-06.07:40:19.232>
    creator = 'epitome83'
    dependencies = []
    files = ['13637']
    hgrepos = []
    issue_num = 5707
    keywords = ['patch']
    message_count = 9.0
    messages = ['85618', '85659', '85668', '85672', '86645', '94998', '151991', '152189', '156772']
    nosy_count = 8.0
    nosy_names = ['terry.reedy', 'kbk', 'amaury.forgeotdarc', 'gpolo', 'roger.serwy', 'asvetlov', 'epitome83', 'gcd0318']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue5707'
    versions = ['Python 3.2']

    @epitome83
    Copy link
    Mannequin Author

    epitome83 mannequin commented Apr 6, 2009

    I downloaded Python 3.0.1 and installed on Vista. I opened IDLE and it
    worked fine. I went into the Preferences to change the keybindings on
    the history scrollers. I changed history-next to Ctrl+Down Arrow,
    though when I pressed OK it listed only Control as the binding. I then
    tried to change history-prev to Ctrl+Up Arrow, but when I pressed OK,
    it gave an error that that binding was already taken. The program then
    crashed. Since then whenever I try to open IDLE, the pythonw.exe
    process appears in my Task Manager briefly, but then it exits, and I
    never see any other evidence the program has opened. The command line
    still works fine. I tried repairing the installation, uninstalling,
    restarting the computer, and removing the leftover registry keys for a
    completely clean install, but nothing has worked to be able to reopen
    the program.

    @epitome83 epitome83 mannequin added type-crash A hard crash of the interpreter, possibly with a core dump topic-IDLE labels Apr 6, 2009
    @amauryfa
    Copy link
    Member

    amauryfa commented Apr 6, 2009

    Reproduced with the console python.exe.
    Click an item in the list on the right to choose the key ("down arrow")

    Exception in Tkinter callback
    Traceback (most recent call last):
      File "c:\Python30\lib\tkinter\__init__.py", line 1405, in __call__
        return self.func(*args)
      File "c:\Python30\lib\idlelib\keybindingDialog.py", line 158, in
    FinalKeySelected
        self.BuildKeyString()
      File "c:\Python30\lib\idlelib\keybindingDialog.py", line 165, in
    BuildKeyString
        keyList.append(finalKey)
    AttributeError: 'filter' object has no attribute 'append'
    
    Then it is still possible to save these settigs, but the binding
    contains event=="Control", and IDLE fails on startup:
    Traceback (most recent call last):
      File "c:\afa\python\py3k\lib\runpy.py", line 128, in _run_module_as_main
        "__main__", fname, loader, pkg_name)
      File "c:\afa\python\py3k\lib\runpy.py", line 34, in _run_code
        exec(code, run_globals)
      File "c:\afa\python\py3k\lib\idlelib\idle.py", line 22, in <module>
        idlelib.PyShell.main()
      File "c:\afa\python\py3k\lib\idlelib\PyShell.py", line 1375, in main
        shell = flist.open_shell()
      File "c:\afa\python\py3k\lib\idlelib\PyShell.py", line 276, in open_shell
        self.pyshell = PyShell(self)
      File "c:\afa\python\py3k\lib\idlelib\PyShell.py", line 800, in __init__
        OutputWindow.__init__(self, flist, None, None)
      File "c:\afa\python\py3k\lib\idlelib\OutputWindow.py", line 16, in
    __init__
        EditorWindow.__init__(self, *args)
      File "c:\afa\python\py3k\lib\idlelib\EditorWindow.py", line 117, in
    __init__
        self.apply_bindings()
      File "c:\afa\python\py3k\lib\idlelib\EditorWindow.py", line 943, in
    apply_bindings
        text.event_add(event, *keylist)
      File "c:\afa\python\py3k\lib\idlelib\MultiCall.py", line 359, in event_add
        widget.event_add(self, virtual, seq)
      File "c:\afa\python\py3k\lib\tkinter\__init__.py", line 1353, in event_add
        self.tk.call(args)
    _tkinter.TclError: bad event type or keysym "Control"

    Simple patch attached.

    @epitome83
    Copy link
    Mannequin Author

    epitome83 mannequin commented Apr 6, 2009

    Thank you for the patch. I have applied it (which is to say, swapped out

    return filter(None, modList)
    for
    return [mod for mod in modList if mod]

    in keybindingDialog.py), but the problem persists. python.exe continues
    to load fine, but pythonw.exe still fails at startup.

    @amauryfa
    Copy link
    Member

    amauryfa commented Apr 6, 2009

    The incorrect settings have been saved in your %USERPROFILE%\.idlerc
    directory. Try deleting the idle-extensions.cfg there.

    BTW, "pythonw.exe" is not IDLE. It's a plain python interpreter without
    a console. When used with no argument it can only exit quickly...

    To see the IDLE error messages, I often type this in a console window:
    c:\python30\python.exe -m idlelib.idle

    @devdanzin devdanzin mannequin added type-bug An unexpected behavior, bug, or error and removed type-crash A hard crash of the interpreter, possibly with a core dump labels Apr 26, 2009
    @kbkaiser
    Copy link
    Contributor

    r71998 Thanks for the patch!

    backport to 30-maint.

    If OP has further problems getting installation working, delete .idlerc
    directory.

    @kbkaiser kbkaiser self-assigned this Apr 27, 2009
    @gcd0318
    Copy link
    Mannequin

    gcd0318 mannequin commented Nov 6, 2009

    Modification to "customer key set" would make IDLE fail to start

    To re-produce:
    1, Start IDLE, and switch to Preference -> Keys;
    2, Make modification to the key binding;
    3, Click Apply, then click OK
    4, repeat above steps.
    The 2nd time to click OK would not get any response.
    But this is not the nightmare. Now quit IDLE and restart IDLE. But IDLE
    cannot restart.

    I believe that bpo-5707 is still exist in Ver. 3.1.1 for Mac OS X.

    OS: Mac OS X 10.6.1
    Python version: 3.1.1

    The error message from console of Mac OS X is attached as following:
    -------------------------------

    Last login: Sat Nov  7 03:34:20 on ttys000
    /Applications/Python\ 3.1/IDLE.app/Contents/MacOS/IDLE ; exit;
    localhost:~ gcd$ /Applications/Python\ 3.1/IDLE.app/Contents/MacOS/IDLE 
    ; exit;
    Traceback (most recent call last):
      File "/Applications/Python 
    3.1/IDLE.app/Contents/Resources/idlemain.py", line 73, in <module>
        main()
      File 
    "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/idlelib
    /PyShell.py", line 1386, in main
        flist.new()
      File 
    "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/idlelib
    /FileList.py", line 49, in new
        return self.EditorWindow(self, filename)
      File 
    "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/idlelib
    /PyShell.py", line 107, in __init__
        EditorWindow.__init__(self, *args)
      File 
    "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/idlelib
    /EditorWindow.py", line 135, in __init__
        self.apply_bindings()
      File 
    "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/idlelib
    /EditorWindow.py", line 961, in apply_bindings
        text.event_add(event, *keylist)
      File 
    "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/idlelib
    /MultiCall.py", line 359, in event_add
        widget.event_add(self, virtual, seq)
      File 
    "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/tkinter
    /__init__.py", line 1353, in event_add
        self.tk.call(args)
    _tkinter.TclError: bad event type or keysym "Control"
    logout

    @terryjreedy
    Copy link
    Member

    The patch fixed a real issue, the difference return of filter in 3.x versus 2.x. Bad key bindings came up in bpo-11437 and bpo-13864 also.

    @serwy
    Copy link
    Mannequin

    serwy mannequin commented Jan 28, 2012

    Amaury's patch has already been applied in (d31be8c9c8a2).

    GUO's description does cause an error. TclTk does not allow "<Control>" by itself to be bounded. This underlying cause for that error is addressed in bpo-6739

    I think this issue should be closed.

    @asvetlov
    Copy link
    Contributor

    Closing the issue. If somebody has a problem related to this — please make a new report.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants