[New-bugs-announce] [issue23631] 3.5 (a2) traceback regression snarls Idle

Terry J. Reedy report at bugs.python.org
Tue Mar 10 22:25:28 CET 2015


New submission from Terry J. Reedy:

3.5.0a2, my Win 7 and Guido's new Win laptop: error tracebacks are mangled in a way that makes Idle severely less functional, hence 'release blocker'.  First, the normal behavior.

Python 3.5.0a2 (v3.5.0a2:0337bd7ebcb6+, Mar  9 2015, 10:29:45) [MSC v.1900 64 bi
t (AMD64)] on win32
>>> 1/0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ZeroDivisionError: division by zero

Idle 3.4.3 and previous give same, with the helpful addition of the code line ('1/0'), as in batch mode tracebacks, since it uses the traceback module.  But Idle 3.5.0a2 started from the installed icon gives

>>> 1/0
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
  File "C:\Program Files\Python 3.5\lib\idlelib\run.py", line 353, in runcode
    exec(code, self.locals)
  File "<pyshell#1>", line 1, in <module>
ZeroDivisionError: division by zero

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python 3.5\lib\idlelib\run.py", line 126, in main
    ret = method(*args, **kwargs)
  File "C:\Program Files\Python 3.5\lib\idlelib\run.py", line 365, in runcode
    print_exception()
  File "C:\Program Files\Python 3.5\lib\idlelib\run.py", line 216, in print_exception
    print_exc(typ, val, tb)
  File "C:\Program Files\Python 3.5\lib\idlelib\run.py", line 211, in print_exc
    traceback.print_list(tbe, file=efile)
  File "C:\Program Files\Python 3.5\lib\traceback.py", line 22, in print_list
    for item in StackSummary.from_list(extracted_list).format():
  File "C:\Program Files\Python 3.5\lib\traceback.py", line 370, in format
    frame.filename, frame.lineno, frame.name))
AttributeError: 'tuple' object has no attribute 'filename'

>>> ================================ RESTART ================================
>>> 


run.py (as should be more or less everything in idlelib) is identical in 3.4 and 3.5.  Idle started from a command line (py -3 -m idlelib) gives an even worse result.  The Idle Shell just shows

>>> 1/0
Traceback (most recent call last):
Traceback (most recent call last):

>>> ================================ RESTART ================================
>>> 


while the following appears in the command window (Command Prompt or PowerShell).

Traceback (most recent call last):
  File "C:\Program Files\Python 3.5\lib\idlelib\run.py", line 353, in runcode
    exec(code, self.locals)
  File "<pyshell#0>", line 1, in <module>
ZeroDivisionError: division by zero

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python 3.5\lib\idlelib\run.py", line 126, in main
    ret = method(*args, **kwargs)
  File "C:\Program Files\Python 3.5\lib\idlelib\run.py", line 365, in runcode
    print_exception()
  File "C:\Program Files\Python 3.5\lib\idlelib\run.py", line 216, in print_exception
    print_exc(typ, val, tb)
  File "C:\Program Files\Python 3.5\lib\idlelib\run.py", line 211, in print_exc
    traceback.print_list(tbe, file=efile)
  File "C:\Program Files\Python 3.5\lib\traceback.py", line 22, in print_list
    for item in StackSummary.from_list(extracted_list).format():
  File "C:\Program Files\Python 3.5\lib\traceback.py", line 370, in format
    frame.filename, frame.lineno, frame.name))
AttributeError: 'tuple' object has no attribute 'filename'
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Program Files\Python 3.5\lib\idlelib\rpc.py", line 359, in pollpacket
    s = self.sock.recv(BUFSIZE)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the r

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python 3.5\lib\idlelib\rpc.py", line 432, in pollresponse
    message = self.pollmessage(wait)
  File "C:\Program Files\Python 3.5\lib\idlelib\rpc.py", line 384, in pollmessage
    packet = self.pollpacket(wait)
  File "C:\Program Files\Python 3.5\lib\idlelib\rpc.py", line 361, in pollpacket
    raise EOFError
EOFError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python 3.5\lib\idlelib\PyShell.py", line 565, in poll_subprocess
    response = clt.pollresponse(self.active_seq, wait=0.05)
  File "C:\Program Files\Python 3.5\lib\idlelib\rpc.py", line 436, in pollresponse
    self.handle_EOF()
  File "C:\Program Files\Python 3.5\lib\idlelib\PyShell.py", line 383, in handle_EOF
    raise EOFError
EOFError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
ValueError: invalid literal for int() with base 10: '??'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python 3.5\lib\tkinter\__init__.py", line 1534, in __call__
    args = self.subst(*args)
  File "C:\Program Files\Python 3.5\lib\tkinter\__init__.py", line 1252, in _substitute
    e.num = getint_event(b)
  File "C:\Program Files\Python 3.5\lib\tkinter\__init__.py", line 1231, in getint_event
    return int(s)
SystemError: result with error in PyObject_Call


This needs to be checked on another OS, but the traceback problem does not strike me as Windows-specific.

----------
keywords: 3.3regression
messages: 237810
nosy: georg.brandl, larry, ncoghlan, terry.reedy
priority: release blocker
severity: normal
stage: needs patch
status: open
title: 3.5 (a2) traceback regression snarls Idle
type: behavior
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23631>
_______________________________________


More information about the New-bugs-announce mailing list