gotcha/ipdb — Issue #10: IPython 'crash report' spam on exception
Author: kazbak
Created: 2011-10-14 10:29:06+00:00
State: open

Consider the following code:

```python
import ipdb;ipdb.set_trace()
1/0
```

Executing this code, then typing 'continue' into ipdb, should generate a traceback of the form:

Traceback (most recent call last):
File "zero.py", line 2, in
1/0
ZeroDivisionError: integer division or modulo by zero

Instead, it generates a (considerably harder to read) IPython crash report:

ZeroDivisionError Python 2.7.1+: /usr/bin/python
Fri Oct 14 11:26:18 2011
A problem occured executing Python code. Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.

/home/jcross/zero.py in ()
1
----> 2
3
4
5
6
7
8
9
10
11
12
13
14
15 import ipdb;ipdb.set_trace()
16 1/0
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

ZeroDivisionError: integer division or modulo by zero

**********************************************************************

Oops, IPython crashed. We do our best to make it stable, but...

A crash report was automatically generated with the following information:
- A verbatim copy of the crash traceback.
- A copy of your input history during this session.
- Data on your current IPython configuration.

It was left in the file named:
'/home/jcross/.ipython/IPython_crash_report.txt'
If you can email this file to the developers, the information in it will help
them in understanding and correcting the problem.

You can mail it to: Fernando Perez at fperez.net@gmail.com
with the subject 'IPython Crash Report'.

If you want to do it now, the following command will work (under Unix):
mail -s 'IPython Crash Report' fperez.net@gmail.com < /home/jcross/.ipython/IPython_crash_report.txt

To ensure accurate tracking of this issue, please file a report about it at:
https://bugs.launchpad.net/ipython/+filebug

Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/IPython/Debugger.py", line 66, in BdbQuit_excepthook
BdbQuit_excepthook.excepthook_ori(et,ev,tb)
File "/usr/lib/python2.7/dist-packages/IPython/CrashHandler.py", line 157, in __call__
report.write(self.make_report(traceback))
File "/usr/lib/python2.7/dist-packages/IPython/CrashHandler.py", line 215, in make_report
rpt_add('BZR revision : %s \n\n' % Release.revision)
AttributeError: 'module' object has no attribute 'revision'

Original exception was:
Traceback (most recent call last):
File "zero.py", line 2, in
1/0
ZeroDivisionError: integer division or modulo by zero

Using Python 2.7, IPython 0.10.1 and ipdb 0.6.