|   | 1 |  initial version  | 
Try the_exception.args[0].
In case anyone is interested, I found this by using your code and then first evaluating the_exception. It printed some relevant information, which was a good sign, so I typed the_exception.[TAB], and args was one of the few options that appeared. the_exception.args is a tuple containing the information you want in the zeroth entry.
 Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.