I have created a program using python and wxpython. I have created an executable file using py2exe. IT is working fine but I had used my company logo as a splashscreen and in the printed drawings. I had to remove the splashscreen to get the executable file to work. In the error text file I get the following:
Traceback (most recent call last):
File “printGland.pyc”, line 418, in OnPrintPage
File “wx_gdi.pyc”, line 3459, in DrawBitmap
wx._core.PyAssertionError: C++ assertion “bmp.Ok()” failed at ….\src\msw\dc.cpp(1181) in wxDC::DoDrawBitmap(): invalid bitmap in wxDC::DrawBitmap
I’m assuming the bmp image has not been included in the executable file. Is there something wrong with the code when it is loaded?
def __init__(self,parent,id):
# Splash Screen
image = wx.Image("Image.bmp",wx.BITMAP_TYPE_BMP)
bmp = image.ConvertToBitmap()
wx.SplashScreen(bmp,wx.SPLASH_CENTRE_ON_SCREEN|wx.SPLASH_TIMEOUT,1000,None,-1)
wx.Yield()
Or is it something I should have added to the setup file when I used py2exe? Any ideas on how to remedy the situation?
From the reference,
For more discussions, here.