New submission from Ned Deily:

Using current IDLE in 2.7 tip (as in 2.7.6rc1), selecting a file to open in the 
IDLE menu or on the command line cause IDLE to either (depending on the 
platform and invocation) crash or hang due to an uncaught exception in 
idlelib/IOBinding.py:

/usr/local/bin/idle2.7 a.py
Exception in Tkinter callback
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py",
 line 1470, in __call__
    return self.func(*args)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/IOBinding.py",
 line 222, in open
    flist.open(filename)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/FileList.py",
 line 36, in open
    return self.EditorWindow(self, filename, key)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/PyShell.py",
 line 131, in __init__
    EditorWindow.__init__(self, *args)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py",
 line 323, in __init__
    io.loadfile(filename)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/IOBinding.py",
 line 258, in loadfile
    chars = self.decode(chars)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/IOBinding.py",
 line 296, in decode
    enc = coding_spec(chars)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/IOBinding.py",
 line 129, in coding_spec
    for line in lst:
NameError: global name 'lst' is not defined

The culprit is 3d46ef0c62c5 for Issue18873 which did a faulty backport of a 
change from the 3.x branches.

----------
assignee: serhiy.storchaka
components: IDLE
messages: 201586
nosy: benjamin.peterson, ned.deily, serhiy.storchaka
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Opening a file in IDLE causes a crash or hang
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19426>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to