wx.EVT_BUTTON not response

I ran into a problem with Gtk-Warning ** error loading theme. It showed on my terminal after I ran my script. Does this warning important to my script? It was a newbie basic script. I tried to make the it prints something after pressing the button. Everything was fine except the print button didn’t work which is why I suspect the gtk was involved in causing the problem. If not, any suggestion? Anything I should check?

By the way, I ran it in conda virtual environment using wxPython 4.0.4 with python 3.7.4 on Arcolinux v19.07.9 LTS.

The GTK warnings are an unfortunate fact of life for wxPython as almost all of the time it’s not a problem or something we can do anything about. The devs working on the gtk port of wxWidgets do take care to do things properly, but it’s often the case that something that doesn’t generate warnings in one build does generate warnings in a different micro release of GTK. Add in different build flags on different distros and it quickly becomes impossible to make a warning free build that works everywhere.

In your case, since it is about not being able to load the theme then my guess is that the build is using Conda’s GTK which doesn’t have access or is unable to find the system GTK theme you have set.

As for the wx.EVT_BUTTON problem, please make a small sample that shows the problem and we’ll give it a look.