Operating system: Linux 6.14.0-37-generic #37~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC x86_64 GNU/Linux
wxPython version & source: 4.2.5 from pypi
Python version & source: Python 3.11.14
Description of the problem:
Calls to wx.glcanvas.GLCanvas fail with errors along the lines of SystemError: <built-in function IsDisplaySupported> returned a result with an exception set.
This doesn't only happen for IsDisplaySupported() but most importantly when calling __init__.
The full stack trace is
NotImplementedError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/user/developer/3d-medical-imaging/wx_test.py", line 4, in <module>
print(glcanvas.GLCanvas.IsDisplaySupported([
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <built-in function IsDisplaySupported> returned a result with an exception set
A small C++ program I built that uses wxGLCanvas works fine on my machine.
I'm not sure about which library versions might also be required to assess the problem. I can submit these later.
Code Example (click to expand)
from wx import glcanvas
print(glcanvas.GLCanvas.IsDisplaySupported([
glcanvas.WX_GL_RGBA,
glcanvas.WX_GL_DOUBLEBUFFER,
glcanvas.WX_GL_DEPTH_SIZE, 24,
]))