KeyboardInterrupt in pylab mode causes ValueError
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
IPython |
Fix Released
|
Low
|
Brian Granger | ||
0.10 |
Fix Released
|
Low
|
Brian Granger |
Bug Description
When started with pylab mode, any KeyboardInterrupts in a running function throw a ValueError as the MAIN_THREAD_ID appears to be incorrectly defined. Can someone reproduce this please?
My version is that packaged with ubuntu 8.04 and is (pasted from the intro ipython text):
Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30)
IPython 0.8.1 -- An enhanced Interactive Python.
Apologies if this has already been debugged - I had a look through the Trac list and couldn't find anything definite.
Here is a sample run (I hit ctrl-c while the asdf() func is running):
In [1]: def asdf():
...: while(True):
...: a = 1;
...:
...:
In [2]: asdf()
-------
<type 'exceptions.
/home/pengwyn/
/home/pengwyn/
/var/lib/
289
290 if CODE_RUN:
--> 291 _async_
292 else:
293 KBINT = True
/var/lib/
270 ctypes.
271 if res == 0:
--> 272 raise ValueError("invalid thread id")
273 elif res != 1:
274 # """if it returns a number greater than one, you're in trouble,
<type 'exceptions.
Related branches
- Fernando Perez: Needs Fixing
- Diff: None lines
Changed in ipython: | |
status: | In Progress → Fix Committed |
Changed in ipython: | |
milestone: | none → 0.10 |
Changed in ipython: | |
status: | Fix Committed → Fix Released |
Can you reproduce this with 0.8.4?
Additionally, what backend are you using? At least I didn't get the error with 0.8.4 + tk backend.