I just re-installed Ubuntu 18.04 on my computer due to some error in booting.
I re-installed python version is 3.9 in Anaconda environment, then installed all the packages I use.
wxPython 4.1.1 was installed via “conda install -c conda-forge wxpython”
My program was working fine before all these re-installations.
Now when I launch it,
first, it complains…
Gtk-Message: 23:58:28.372: Failed to load module “canberra-gtk-module”
(By the way, I made sure that both ‘libcanberra-gtk-module’ and ‘libcanberra-gtk3-module’ are installed.)
Then, it fails to load PNG image, saying that the image is invalid.
bmp = wx.Bitmap(img)
wx._core.wxAssertionError: C++ assertion ““image.IsOk()”” failed at /home/conda/feedstock_root/build_artifacts/wxpython_1651509130300/work/ext/wxWidgets/src/gtk/bitmap.cpp(640) in wxBitmap(): invalid image
The image is fine. I can open it in other programs and
if I exports the image as JPG, wxPython loads it fine.
Changing all my images to JPG will be one solution to me.
But, is there something obvious I’m missing to make wxPython working with PNG files?