[wxPython] Exception when exiting application under Windows

Hi all,

I am getting the following exceptions when I exit my application.

Exception exceptions.TypeError: "object of type 'None' is not callable" in
<method wxColourPtr.__del__ of wxColour instance at 0164D324> ignored

Exception exceptions.TypeError: "object of type 'None' is not callable" in
<method wxPyPenPtr.__del__ of wxPyPen instance at 0164D45C> ignored

It seems that the gdic is no longer available by the time these methods are
called.

Should I ignore these errors or how can a rectify the problem?

Regards
Gerrit van Dyk

···

-------------------------------------------------------------------------
This e-mail is intended only for the use of the individual or entity named
above and may contain information that is confidential and privileged,
proprietary to the company and protected by law. If you are not the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this e-mail is strictly prohibited. Opinions, conclusions and
other information in this message that do not relate to the official
business of our company shall be understood as neither given nor endorsed by
it.

I am getting the following exceptions when I exit my application.

Exception exceptions.TypeError: "object of type 'None' is not callable" in
<method wxColourPtr.__del__ of wxColour instance at 0164D324> ignored

Exception exceptions.TypeError: "object of type 'None' is not callable" in
<method wxPyPenPtr.__del__ of wxPyPen instance at 0164D45C> ignored

It seems that the gdic is no longer available by the time these methods

are

called.

Should I ignore these errors or how can a rectify the problem?

They can usually be ignored, but you should be able to get rid of them by
ensuring that you don't have any global instances of these objects as the
globals are usually the last ones cleaned up. One other thing to watch out
for is using instances as default parameters, like this:

    def Draw(self, dc, pen=wxPen("BLUE")):
        ...

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!