<div class="gmail_quote">On Fri, Jun 25, 2010 at 5:20 AM, Vasilis Vlachoudis <span dir="ltr">&lt;<a href="mailto:Vasilis.Vlachoudis@cern.ch">Vasilis.Vlachoudis@cern.ch</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi all,<br>
<br>
I have a tkinter application that uses several fonts. However only with python 2.4 when the application is closed then I get the following exceptions (with 2.6 it works Ok)<br>
<br>
Exception exceptions.AttributeError: &quot;&#39;NoneType&#39; object has no attribute &#39;TclError&#39;&quot; in &lt;bound method Font.__del__ of &lt;tkFont.Font instance at 0x2ac0dd4c4908&gt;&gt; ignored<br>
Exception exceptions.AttributeError: &quot;&#39;NoneType&#39; object has no attribute &#39;TclError&#39;&quot; in &lt;bound method Font.__del__ of &lt;tkFont.Font instance at 0x2ac0dd4c4680&gt;&gt; ignored<br>
<br>
and I have no way of capturing them since they arrive even after the last line of the program.<br>
I believe that for some reason the tkinter is deleted before and afterwards it tries to delete the fonts and creates the TclError.<br>
Is there a way to protect for these exceptions?<br></blockquote><div><br></div><div>If you&#39;re on linux you can redirect the errors via</div><div><br></div><div>$ python myfile.py &gt; mylog.txt</div><div><br></div><div>

I&#39;m not sure how you would catch the exceptions, though.</div><div><br></div><div>-Wayne</div></div>