Phoenix icon indicating copy to clipboard operation
Phoenix copied to clipboard

SystemError: <slot wrapper '__init__' of 'sip.simplewrapper' objects> returned a result with an error set

Open Auditor1234 opened this issue 2 years ago • 2 comments

Operating system: ubuntu22.04.01 wxPython version & source: 4.2.1 Python version & source: 3.8.19

Description of the problem: When I use 'glcanvas' to initialize a instance like this glcanvas.GLCanvas.__init__(self, parent, -1, attribList=attribList), then my program raise the exception.

Code Example (click to expand)
# Put code sample here
class Canvas3D(glcanvas.GLCanvas):
    def __init__(self, parent, manager=None):
        attribList = attribs = (glcanvas.WX_GL_CORE_PROFILE, glcanvas.WX_GL_RGBA, glcanvas.WX_GL_DOUBLEBUFFER, glcanvas.WX_GL_DEPTH_SIZE, 24)
        glcanvas.GLCanvas.__init__(self, parent, -1, attribList=attribList)
        self.init = False

on above

parent is <myvi.canvas3d.Viewer3D object at 0x75b558e26dc0>, an object inhereit from class `wx.Panel`
attribList=(21, 0, 3, 10, 24)

Auditor1234 avatar Apr 03 '24 14:04 Auditor1234

Please provide both:

  1. The full stacktrace.
  2. A simple, complete, runnable example that reproduces the problem.

swt2c avatar Apr 03 '24 20:04 swt2c

Thank you for your reply, cuase this problem occurs when I use other guy's complicate project and I am not familiar with wxPython , I am unable to simplify it and provide a simple example.

While the full stacktrace is as following:

/data/lzr/NormalSoftware/Anaconda3/envs/mamba/lib/python3.8/site-packages/wx/lib/pubsub/__init__.py:23: wxPyDeprecationWarning: wx.lib.pubsub has been deprecated, please migrate your code to use pypubsub, available on PyPI.
  warnings.warn('wx.lib.pubsub has been deprecated, please migrate your '
NotImplementedError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/data/lzr/ProgramFiles/python/Temp/Show3D.py", line 31, in <module>
    manager.show('Organ 3D Demo')
  File "/data/lzr/ProgramFiles/python/Temp/myvi/manager.py", line 282, in show
    Frame3D(None, title, self).Show()
  File "/data/lzr/ProgramFiles/python/Temp/myvi/frame3d.py", line 17, in __init__
    self.viewer = canvas3d.Viewer3D( self , manager)
  File "/data/lzr/ProgramFiles/python/Temp/myvi/canvas3d.py", line 132, in __init__
    self.canvas = Canvas3D(self, manager)
  File "/data/lzr/ProgramFiles/python/Temp/myvi/canvas3d.py", line 14, in __init__
    glcanvas.GLCanvas.__init__(self, parent, -1, attribList=attribList)
SystemError: <slot wrapper '__init__' of 'sip.simplewrapper' objects> returned a result with an error set

Auditor1234 avatar Apr 04 '24 01:04 Auditor1234