It's not giving me an exception. Here is the code I used: from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4.phonon import Phonon import os import sys, traceback
def lumberjack(): song = '/home/tannhaus/Music/A Perfect Circle/eMOTIVE/02 Imagine.mp3' QCoreApplication.setApplicationName("Phonon") output = Phonon.AudioOutput(Phonon.MusicCategory) m_media = Phonon.MediaObject() Phonon.createPath(m_media, output) m_media.setCurrentSource(Phonon.MediaSource(song)) m_media.play() class MainWindow(QMainWindow): def __init__(self, parent=None): super(MainWindow, self).__init__(parent) try: lumberjack() except IndexError: exc_type, exc_value, exc_traceback = sys.exc_info() print "*** print_tb:" traceback.print_tb(exc_traceback, limit=1, file=sys.stdout) print "*** print_exception:" traceback.print_exception(exc_type, exc_value, exc_traceback, limit=2, file=sys.stdout) print "*** print_exc:" traceback.print_exc() print "*** format_exc, first and last line:" formatted_lines = traceback.format_exc().splitlines() print formatted_lines[0] print formatted_lines[-1] print "*** format_exception:" print repr(traceback.format_exception(exc_type, exc_value, exc_traceback)) print "*** extract_tb:" print repr(traceback.extract_tb(exc_traceback)) print "*** format_tb:" print repr(traceback.format_tb(exc_traceback)) print "*** tb_lineno:", exc_traceback.tb_lineno if __name__=="__main__": from sys import argv, exit a=QApplication(argv) m=MainWindow() m.show() m.raise_() exit(a.exec_()) When I run it, the complete and only error I get is: libv4l2: error getting pixformat: Invalid argument When I check /var/log/messages, I see these messages: 2013-08-27T18:12:04.163062-05:00 tannhaus-PC kernel: [ 1786.397499] xc2028 9-0061: i2c input error: rc = -19 (should be 2) 2013-08-27T18:12:04.187054-05:00 tannhaus-PC kernel: [ 1786.421479] xc2028 9-0061: i2c input error: rc = -19 (should be 2) 2013-08-27T18:12:04.391057-05:00 tannhaus-PC kernel: [ 1786.625614] xc2028 9-0061: i2c input error: rc = -19 (should be 2) 2013-08-27T18:12:04.415052-05:00 tannhaus-PC kernel: [ 1786.649613] xc2028 9-0061: i2c input error: rc = -19 (should be 2) -- http://mail.python.org/mailman/listinfo/python-list