Message79815
I wrote a patch to support <traceback object>.tb_frame=None. It works
but the traceback becomes useless because you have unable to display
the traceback. The frame is used by tb_printinternal() to get the
filename (co_filename) and the code name (co_name).
I also tried:
while tbi:
frame = tbi.tb_frame
tbi = tbi.tb_next
frame.f_locals.clear()
frame.f_globals.clear()
... and it doesn't work because the tbi variable is also removed!
A traceback object have to contain the full frame, but the frame
contains "big" objects eating your memory. A solution to your initial
problem (store exceptions) is to not store the traceback object or at
least to store it as a (list of) string. Solution already proposed by
loewis (msg29999). |
|
Date |
User |
Action |
Args |
2009-01-14 00:35:03 | vstinner | set | recipients:
+ vstinner, tim.peters, loewis, akuchling, ghazel |
2009-01-14 00:35:03 | vstinner | set | messageid: <1231893303.58.0.433889168889.issue1565525@psf.upfronthosting.co.za> |
2009-01-14 00:35:03 | vstinner | link | issue1565525 messages |
2009-01-14 00:35:02 | vstinner | create | |
|