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

wx/core.py fails to launch on Fedora 40 Python 3.12 #2643

Open
telombardi opened this issue Nov 13, 2024 · 7 comments
Open

wx/core.py fails to launch on Fedora 40 Python 3.12 #2643

telombardi opened this issue Nov 13, 2024 · 7 comments

Comments

@telombardi
Copy link

Operating system: Fedora 40 (6.11.6-200.fc40.x86_64)
wxPython version & source: 4.2.2 via pip Requirement already satisfied: wxpython in /usr/local/lib64/python3.12/site-packages (4.2.2)
Python version & source: Python 3.12.7 from dnf install

Description of the problem:

We are running an application that we've run for sometime with wxPython. When we run the code on our new build, we get the following error when we launch the GUI.

/usr/local/lib64/python3.12/site-packages/wx/core.py:2232: Warning: cannot register existing type 'GdkDisplayManager'
self._BootstrapApp()
/usr/local/lib64/python3.12/site-packages/wx/core.py:2232: Warning: g_once_init_leave_pointer: assertion 'result != 0' failed
self._BootstrapApp()
/usr/local/lib64/python3.12/site-packages/wx/core.py:2232: Warning: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
self._BootstrapApp()

I suspect that this is a configuration error on my part, but I cannot find it.

Any ideas?

Code Example (click to expand)
# Put code sample here
@swt2c
Copy link
Collaborator

swt2c commented Nov 13, 2024

Are you possibly mixing GTK2 and GTK3 (wxPython) in your app somehow?

https://stackoverflow.com/questions/61509812/issue-glib-gobject-warning-cannot-register-existing-type-gdkdisplaymanager

@telombardi
Copy link
Author

Are you possibly mixing GTK2 and GTK3 (wxPython) in your app somehow?

https://stackoverflow.com/questions/61509812/issue-glib-gobject-warning-cannot-register-existing-type-gdkdisplaymanager

Thanks for the suggestion. I will check it out and post back shortly.

@telombardi
Copy link
Author

https://stackoverflow.com/questions/61509812/issue-glib-gobject-warning-cannot-register-existing-type-gdkdisplaymanager

Python 3.12.7 (main, Oct 1 2024, 00:00:00) [GCC 14.2.1 20240912 (Red Hat 14.2.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.

import wx
wx.version()
'4.2.2 gtk3 (phoenix) wxWidgets 3.2.6'

I am confirming with developers what version the code depends on.

If this is the issue, then I suppose I'll need to find a version wxPython that can be built with gtk2. Does that sound right?

@swt2c
Copy link
Collaborator

swt2c commented Nov 15, 2024

If this is the issue, then I suppose I'll need to find a version wxPython that can be built with gtk2. Does that sound right?

Not necessarily. My question was more about whether you are using other GUI libraries (other than wxPython) in your application.

@telombardi
Copy link
Author

The code has been using GTK3 for quite some time (since 2019).

Any other possible explanations?

@telombardi
Copy link
Author

If this is the issue, then I suppose I'll need to find a version wxPython that can be built with gtk2. Does that sound right?

Not necessarily. My question was more about whether you are using other GUI libraries (other than wxPython) in your application.

We use matplotlib among other things. I think I see your point. I will chase down some of our other packages too.

Any suggestions in this regard?

@swt2c
Copy link
Collaborator

swt2c commented Nov 15, 2024

matplotlib is a good suspect. If it's trying to use GTK-2, that could be a problem.

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

2 participants