-        wxBitmapButton(self, 30, bmp, wxPoint(140, 20),
+            try:
+                bmp = wxBitmap("nosuchfile.bmp", wxBITMAP_TYPE_BMP)
+                mask = wxMaskColour(bmp, wxBLUE)
+            except wxPyAssertionError:
+                self.log.write("Caught wxPyAssertionError!  I will fix the problem.\n")
+                bmp = images.getTest2Bitmap()
+                mask = wxMaskColour(bmp, wxBLUE)
+        else:
+            bmp = images.getTest2Bitmap()
+            mask = wxMaskColour(bmp, wxBLUE)
+
+        bmp.SetMask(mask)
+        wxBitmapButton(self, 30, bmp, wxPoint(160, 20),