[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 329
  • Last Modified:

traceback module

I want to capture as much information about an exception as I can ... using the traceback module I want all the details of an exception including any errors from the OS interaction... Below is the code I'm using but I don't want the info to print to the screen but to my log file and what arguments give me the most detail especially the glitch Im searching for that only occurs occasionally and I suspect is a conflict between wxpython and windows os...


except Exception, err:
	    #print 'format_exception():'
	    exc_type, exc_value, exc_tb = sys.exc_info()
	    pprint(traceback.format_exception(exc_type, exc_value, exc_tb))    

Open in new window

  • 2
1 Solution
You might try following Softawre:

Nothing to do with Python or WxWidgets, but it should help to trace system calls (similiar to strace on Linux) on a Windows machine.


The Software is already rather old, but I don't know any newer Software, which is doing the same job.

I wonder whether your safest bet wouldn't be to try to find the smallest possible program reproducing the bug and trying to contact the wxWidgets community.

I once had a Problem with Python QT and after quite some work) I was able to reduce it to a 30 line Python application, which I could rewrite as C++ application reproducing the same behaviour (thus excluding python from the list of culprits) and having a test case, which could be sent to the Qt community (which isn't necessarily 'fluent' in Python)

dolamitejenkinsAuthor Commented:
i've been trying to do that but I don't know what triggers the error and it seems to be so random when it happens that its hard to narrow down my code... i'm working on it... thanks for the guidance I truly appreciate it
dolamitejenkinsAuthor Commented:
took your advice and went to the wxpython community and i think they solved the problem

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now