Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program crashes on startup #1

Closed
jdshewey opened this issue Feb 3, 2023 · 2 comments
Closed

Program crashes on startup #1

jdshewey opened this issue Feb 3, 2023 · 2 comments

Comments

@jdshewey
Copy link
Owner

jdshewey commented Feb 3, 2023

With Python 3 and wxpython 4, the program crashes on startup with the error:

raceback (most recent call last):
File "/home/admin/pymapper/./pymapper.py", line 13438, in OnInit
self.init_frame()
File "/home/admin/pymapper/./pymapper.py", line 13674, in init_frame
self.LoadMarkerFiles()
File "/home/admin/pymapper/./pymapper.py", line 15075, in LoadMarkerFiles
bitmap = self.UpdateMarkerImage(marker)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/admin/pymapper/./pymapper.py", line 15179, in UpdateMarkerImage
bitmap_mask = wx.Mask(wx.Bitmap(bitmapPath, wx.BITMAP_TYPE_PNG))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
wx._core.wxAssertionError: C++ assertion ""bitmap.GetDepth() == 1"" failed at ../src/gtk/bitmap.cpp(258) in InitFromMonoBitmap(): Cannot create mask from colour bitmap
OnInit returned false, exiting...

@jdshewey
Copy link
Owner Author

jdshewey commented Feb 3, 2023

Tried re-saving the image in monochrome format, but this did not work.

@jdshewey
Copy link
Owner Author

jdshewey commented Feb 3, 2023

Was able to add wx.BLACK as a parameter to the mask function and this seems to clear it up.

@jdshewey jdshewey closed this as completed Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant