This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients terry.reedy
Date 2015-08-25.16:41:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1440520884.78.0.336489829691.issue24936@psf.upfronthosting.co.za>
In-reply-to
Content
With one process (installed 2.7.10, -n option):
>>> raise
Traceback (most recent call last):
  File "<pyshell#0>", line 2, in <module>
TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType

With subprocess (default option):
>>> raise

Traceback (most recent call last):
** IDLE Internal Exception: 
  File "C:\Programs\Python27\lib\idlelib\run.py", line 325, in runcode
    exec code in self.locals
  File "C:\Programs\Python27\lib\idlelib\run.py", line 111, in main
    seq, request = rpc.request_queue.get(block=True, timeout=0.05)
  File "C:\Programs\Python27\lib\Queue.py", line 176, in get
    raise Empty
Empty

The 2.7.10 says " If no exception is active in the current scope, a TypeError exception is raised indicating that this is an error (if running under IDLE, a Queue.Empty exception is raised instead)."  The comment is not true with -n.  But adding changing 'IDLE' to 'IDLE without -n' might encourage people to think that they should use '-n'.

A workaround fix might be to add a special check to the internal error handling code to print the TypeError instead. I do not know of any other open issues about Internal Exceptions being printed.

This is a low priority issue, but it is peculiar that this seems to be the only exception so mangled. The only issue issue I found related to this section of the Idle code is #1190163.

This is a 2.7 issue only. In 3.4+, console or Idle in either mode:
>>> raise
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    raise
RuntimeError: No active exception to reraise
History
Date User Action Args
2015-08-25 16:41:24terry.reedysetrecipients: + terry.reedy
2015-08-25 16:41:24terry.reedysetmessageid: <1440520884.78.0.336489829691.issue24936@psf.upfronthosting.co.za>
2015-08-25 16:41:24terry.reedylinkissue24936 messages
2015-08-25 16:41:24terry.reedycreate