Package: idle
Version: 2.7.5-5
Severity: important

Dear Maintainer,

I'm running IDLE with Python 2.7 and it no longer opens *.py files.
It opens a blank white window that persists even after IDLE is closed and
doesn't respond to 'sudo killall idle'.  Fix is included below.


This is the error for trying to open a file from the "Open..." dialog or "Recent
Files" options in IDLE's File menu:

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


and the error from trying to close the window:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1473, in __call__
    return self.func(*args)
  File "/usr/lib/python2.7/idlelib/EditorWindow.py", line 1025, in close
    self._close()
  File "/usr/lib/python2.7/idlelib/PyShell.py", line 302, in _close
    EditorWindow._close(self)
  File "/usr/lib/python2.7/idlelib/EditorWindow.py", line 1032, in _close
    self.unload_extensions()
  File "/usr/lib/python2.7/idlelib/EditorWindow.py", line 1053, in 
unload_extensions
    for ins in self.extensions.values():
AttributeError: 'PyShellEditorWindow' object has no attribute 'extensions'
^[[B^[[B^CTraceback (most recent call last):
  File "/usr/bin/idle", line 5, in <module>
    main()
  File "/usr/lib/python2.7/idlelib/PyShell.py", line 1582, in main
    root.mainloop()
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1071, in mainloop
    self.tk.mainloop(n)
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1468, in __call__
    def __call__(self, *args):



I was able to fix this by opening /usr/lib/python2.7/idlelib/IOBinding.py and
replacing line 128:

        str = str.split("\n", 2)[:2]

with:

        lst = str.split("\n", 2)[:2]


Thanks,

Chris Olsen



-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.10-3-686-pae (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages idle depends on:
ii  idle-python2.7  2.7.5-8
ii  python          2.7.5-5
ii  python-tk       2.7.5-1

idle recommends no packages.

idle suggests no packages.

-- debconf-show failed


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to